Node 的设计错误采用了 autotools 表示极度不满)。 ### 遗憾:package.json • Isaac 在 NPM 中发明了 package.json(大部分)。 但是我通过允许 Node 的 require() 来检查 package.json 文件的“main”。 - 最后,我在 Node 发布中包含了NPM,这使得它成为事实上的标准。 - 不幸的是,有一个模块化的(私有控制的)存储库。 r requirie("somemodule")不是明确的。 定义的地方太多了。 your javascript program package.json NPM's database require("somemodule") // Code that uses // somemodule { "dependencies": { "somemodule": 它极大地复杂化了模块分辨算法。 默认情况下有良好的意图,但在实践中,只使用 $Node_PATH 不会排除这一点。 很大程度上偏离了浏览器语义。 这是我的错,我很抱歉。不幸的是现在不可能撤消。 ### 遗憾:require("module") 没有扩展名 ".js" - 不必要的不明确。 - 不是浏览器 JavaScript 工作方式。不能在脚本标记 src 属性中省略“.js”。0 码力 | 28 页 | 767.84 KB | 2 年前3
Node.js - the corep10_1.jpg) • Some libraries require following these conventions ex.Async.js • See example on next slide ## Request a Call back ## Callback Example var fs = require('fs'); function readObject(filePath "Missouri", "zip": 63304 }, "hobby": "running" } fs = require 'fs' CoffeeScript readObject = (filePath, cb) -> fs.readFile filePath, (err, buf) https://github.com/caolan/async ## Async Example var async = require('async'); var fs = require('fs'); var rimraf = require('rimraf'); // Unix "rm -rf" for Node var dirPath0 码力 | 124 页 | 7.87 MB | 2 年前3
Node.js Manual & Documentation发布:Lenzhang ## Table Of Contents • Synopsis 概要 Global Objects 全局对象 global o process require() require.resolve() require.paths o ___filename o dirname o module Timers 定时器 o setTimeout(callback, delay 总结一下... ○ Loading from the `require.paths` Folders 从 `require.paths` 目录中加载 Note:** Please Avoid Modifying `require.paths` **注意:** 请不要修改 `requires.paths` Setting `require.paths` to some other value does does nothing. 将 `require.paths` 设为其他值不会产生任何作用 Putting relative paths in `require.paths` is... weird. 不建议在 `require.paths` 中发入相对路径 Zero Isolation 零隔离 Addenda: Package Manager Tips 附录:包管理技巧 • Addons0 码力 | 153 页 | 1.21 MB | 2 年前3
BabelJS Tutorialthe webpack.config.js file which will build the final file. #### webpack.config.js var path = require('path'); module.exports = { entry: { app: './src/main.js' }, module cache /** * var installedModules = {}; */ /** * // The require function * function __webpack_require__(moduleId) { * * // Check if module is in cache * if(installedModules[moduleId]) module function * modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); * * // Flag the module as loaded * module.l = true; * * // Return the exports0 码力 | 173 页 | 2.70 MB | 2 年前3
The Node.js Handbook
Node.js application The most common example Hello World of Node.js is a web server: const http = require('http') const hostname = '127.0.0.1' const port = 3000 const server = http.createServer((req the way to load modules across all JavaScript, frontend or backend, but Node.js still supports the require syntax. ### 6. The V8 JavaScript Engine V8 is the name of the JavaScript engine that powers Google processing is done. Many times with Node.js we start servers, like this HTTP server: const express = require('express') const app = express() app.get('/', (req, res) => { res.send('Hi0 码力 | 161 页 | 1.66 MB | 2 年前3
Back to Basics Testing'); #include "catch.hpp" TEST_CASE("left_pad pads strings to a minimum length") { REQUIRE(left_pad("", 0) == ""); } #include "gtest/gtest.h" TEST(left_pad_pads_st hpp" TEST_CASE("left_pad pads strings to a minimum length") { REQUIRE(left_pad("", 0) == ""); REQUIRE(left_pad("abc", 0) == "abc"); } #include "gtest/gtest < string length, the existing string is returned") { REQUIRE(left_pad("", 0) == ""); REQUIRE(left_pad("abc", 0) == "abc"); } } #include "gtest/gtest0 码力 | 79 页 | 25.86 MB | 1 年前3
Learning Gulp$ npm install --save-dev gulp 5. Create a gulpfile.js at the root of your project: var gulp = require('gulp'); gulp.task('default', function() { // place code for your default task parameter is an array of tasks to be executed and completed before your task will run: var gulp = require('gulp'); gulp.task('one', function() { // compile sass css }); gulp.task('two' js file in sub folder using gulp var gulp = require('gulp'); // include plug-ins var uglify = require('gulp-uglify'), concat = require('gulp-concat'); // Minified file gulp0 码力 | 45 页 | 977.19 KB | 2 年前3
httpd 2.4.17 中文文档changes in the API updates overview. This document describes changes in server behavior that might require you to change your configuration or how you use the server in order to continue using 2.4 as you significant changes in authorization configuration, and other minor configuration changes, that could require changes to your 2.2 configuration files before using them for 2.4. ## Authorization Any configuration RequireAll. If you use mod_authz_dbm, you must port your configuration to use Require dbm-group ... in place of Require group ... ## Access control In 2.2, access control based on client hostname, IP0 码力 | 2455 页 | 1.88 MB | 1 年前3
httpd 2.4.16 中文文档changes in the API updates overview. This document describes changes in server behavior that might require you to change your configuration or how you use the server in order to continue using 2.4 as you significant changes in authorization configuration, and other minor configuration changes, that could require changes to your 2.2 configuration files before using them for 2.4. ## Authorization Any configuration RequireAll. If you use mod_authz_dbm, you must port your configuration to use Require dbm-group ... in place of Require group ... ## Access control In 2.2, access control based on client hostname, IP0 码力 | 2438 页 | 1.87 MB | 1 年前3
Apache HTTP Server Documentation Version 2.4the API updates (p. 1023) overview. This document describes changes in server behavior that might require you to change your configuration or how you use the server in order to continue using 2.4 as you significant changes in authorization configuration, and other minor configuration changes, that could require changes to your 2.2 configuration files before using them for 2.4. ## Authorization Any configuration REQUIREALL. If you use MOD_AUTHZ_DBM, you must port your configuration to use Require dbm-group ... in place of Require group ... ## Access control In 2.2, access control based on client hostname, IP0 码力 | 1125 页 | 4.15 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
GYPPromiseNode_modules安全性require函数Node.jscore modulesJavaScriptV8require模块require()定时器全局对象BabelJSpresetplugintranspilingpolyfillsnpmV8引擎事件循环测试测试类型单元测试动态测试挑战Gulp任务运行器自动化配置文件mod_auth_basicmod_authn_filemod_authnz_ldapmod_authz_hostmod_info多处理模块(MPM)API变化新模块发行说明升级指南Apache HTTP Server 2.4MPMmod_proxyAuthorizationConfiguration Files













