UNPKG

motion

Version:

motion - moving development forward

127 lines (126 loc) 19.5 kB
{ "_args": [ [ "webpack@https://registry.npmjs.org/webpack/-/webpack-1.12.11.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "webpack@1.12.11", "_id": "webpack@1.12.11", "_inCache": true, "_location": "/webpack", "_phantomChildren": {}, "_requested": { "name": "webpack", "raw": "webpack@https://registry.npmjs.org/webpack/-/webpack-1.12.11.tgz", "rawSpec": "https://registry.npmjs.org/webpack/-/webpack-1.12.11.tgz", "scope": null, "spec": "https://registry.npmjs.org/webpack/-/webpack-1.12.11.tgz", "type": "remote" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/webpack/-/webpack-1.12.11.tgz", "_shasum": "fc33e4139e32eb8e7d7e215089f9f482165cf5e8", "_shrinkwrap": null, "_spec": "webpack@https://registry.npmjs.org/webpack/-/webpack-1.12.11.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "name": "Tobias Koppers @sokra" }, "bin": { "webpack": "./bin/webpack.js" }, "bugs": { "url": "https://github.com/webpack/webpack/issues" }, "dependencies": { "async": "^1.3.0", "clone": "^1.0.2", "enhanced-resolve": "~0.9.0", "esprima": "^2.5.0", "interpret": "^0.6.4", "loader-utils": "^0.2.11", "memory-fs": "~0.3.0", "mkdirp": "~0.5.0", "node-libs-browser": ">= 0.4.0 <=0.6.0", "optimist": "~0.6.0", "supports-color": "^3.1.0", "tapable": "~0.1.8", "uglify-js": "~2.6.0", "watchpack": "^0.2.1", "webpack-core": "~0.6.0" }, "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.", "devDependencies": { "benchmark": "^1.0.0", "bundle-loader": "~0.5.0", "codecov.io": "^0.1.2", "coffee-loader": "~0.7.1", "coffee-script": "^1.10.0", "component-webpack-plugin": "~0.2.0", "coveralls": "^2.11.2", "css-loader": "~0.15.0", "diff": "^2.0.2", "eslint": "^1.1.0", "eslint-plugin-nodeca": "^1.0.3", "express": "~4.13.1", "extract-text-webpack-plugin": "~0.8.0", "file-loader": "~0.8.0", "glob": "^5.0.14", "i18n-webpack-plugin": "~0.2.0", "istanbul": "^0.3.13", "jade": "^1.11.0", "jade-loader": "~0.7.0", "js-beautify": "^1.5.10", "json-loader": "~0.5.1", "less": "^2.5.1", "less-loader": "^2.0.0", "mocha": "~2.2.0", "mocha-lcov-reporter": "0.0.2", "raw-loader": "~0.5.0", "script-loader": "~0.6.0", "should": "^7.0.2", "style-loader": "~0.12.0", "url-loader": "~0.5.0", "val-loader": "~0.5.0", "vm-browserify": "~0.0.0", "webpack-dev-middleware": "^1.0.0", "worker-loader": "~0.6.0" }, "engines": { "node": ">=0.6" }, "files": [ "bin/", "buildin/", "hot/", "lib/", "web_modules/" ], "homepage": "https://github.com/webpack/webpack", "license": "MIT", "main": "lib/webpack.js", "name": "webpack", "optionalDependencies": {}, "readme": "[![webpack](https://webpack.github.io/assets/logo.png)](https://webpack.github.io)\r\n\r\n\r\n[![NPM version][npm-image]][npm-url] [![Gitter chat][gitter-image]][gitter-url] [![Downloads][downloads-image]][downloads-url]\r\n[![NPM][nodei-image]][nodei-url]\r\n\r\nbuild\r\n[![Build Status][travis-image]][travis-url] [![Appveyor Status][appveyor-image]][appveyor-url] [![Coverage Status][coveralls-image]][coveralls-url]\r\n\r\ndependencies\r\n[![Dependency Status][david-image]][david-url] [![devDependency Status][david-dev-image]][david-dev-url] [![peerDependency Status][david-peer-image]][david-peer-url]\r\n\r\ndonation\r\n[![gratipay donate button][gratipay-image]][gratipay-url] [![Donate to sokra][donate-image]][donate-url]\r\n\r\n\r\n[documentation](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=top)\r\n\r\n# Introduction\r\n\r\nwebpack is a bundler for modules. The main purpose is to bundle JavaScript\r\nfiles for usage in a browser, yet it is also capable of transforming, bundling,\r\nor packaging just about any resource or asset.\r\n\r\n\r\n**TL; DR**\r\n\r\n* Bundles both [CommonJs](http://www.commonjs.org/specs/modules/1.0/) and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).\r\n* Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time).\r\n* Dependencies are resolved during compilation reducing the runtime size.\r\n* Loaders can preprocess files while compiling, e.g. coffeescript to JavaScript, handlebars strings to compiled functions, images to Base64, etc.\r\n* Highly modular plugin system to do whatever else your application requires.\r\n\r\n# Getting Started\r\n\r\nCheck out webpack's [documentation](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=trdr) for quick Getting Started guide, in-depth usage,\r\ntutorials and resources.\r\n\r\n# Installation\r\n\r\nproject:\r\n`npm install webpack --save-dev`\r\n\r\nglobal:\r\n`npm install webpack -g`\r\nUsage\r\nhttps://webpack.github.io/docs/tutorials/getting-started/\r\n\r\n# Examples\r\n\r\nTake a look at the [`examples`](https://github.com/webpack/webpack/tree/master/examples) folder.\r\n\r\n# Features\r\n\r\n## Plugins\r\n\r\nwebpack has a [rich plugin\r\ninterface](https://webpack.github.io/docs/plugins.html). Most of the features\r\nwithin webpack itself use this plugin interface. This makes webpack very\r\n**flexible**.\r\n\r\n\r\n## Performance\r\n\r\nwebpack uses async I/O and has multiple caching levels. This makes webpack fast\r\nand incredibly **fast** on incremental compilations.\r\n\r\n## Loaders\r\n\r\nwebpack enables use of loaders to preprocess files. This allows you to bundle\r\n**any static resource** way beyond JavaScript. You can easily [write your own\r\nloaders](https://webpack.github.io/docs/loaders.html) using node.js.\r\n\r\nLoaders are activated by using `loadername!` prefixes in `require()` statements,\r\nor are automatically applied via regex from your webpack configuration.\r\n\r\nPlease see [Using Loaders](https://webpack.github.io/docs/using-loaders.html) for more information.\r\n\r\n**basic**\r\n* [`json`](https://github.com/webpack/json-loader): Loads file as JSON\r\n* [`raw`](https://github.com/webpack/raw-loader): Loads raw content of a file (as utf-8)\r\n* [`val`](https://github.com/webpack/val-loader): Executes code as module and consider exports as JavaScript code\r\n* [`script`](https://github.com/webpack/script-loader): Executes a JavaScript file once in global context (like in script tag), requires are not parsed.\r\n\r\n**packaging**\r\n* [`file`](https://github.com/webpack/file-loader): Emits the file into the output folder and returns the (relative) url.\r\n* [`url`](https://github.com/webpack/url-loader): The url loader works like the file loader, but can return a Data Url if the file is smaller than a limit.\r\n* [`image`](https://github.com/tcoopman/image-webpack-loader): Compresses your images. Ideal to use together with `file` or `url`.\r\n* [`svgo-loader`](https://github.com/pozadi/svgo-loader): Compresses SVG images using [svgo](https://github.com/svg/svgo) library\r\n* [`baggage`](https://github.com/deepsweet/baggage-loader): Automatically require any resources related to the required one\r\n* [`polymer-loader`](https://github.com/JonDum/polymer-loader): Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules.\r\n\r\n**dialects**\r\n* [`coffee`](https://github.com/webpack/coffee-loader): Loads coffee-script like JavaScript\r\n* [`babel`](https://github.com/babel/babel-loader): Turn ES6 code into vanilla ES5 using [Babel](https://github.com/babel/babel).\r\n* [`livescript`](https://github.com/appedemic/livescript-loader): Loads LiveScript like JavaScript\r\n* [`sweetjs`](https://github.com/jlongster/sweetjs-loader): Use sweetjs macros.\r\n* [`traceur`](https://github.com/jupl/traceur-loader): Use future JavaScript features with [Traceur](https://github.com/google/traceur-compiler).\r\n* [`typescript`](https://github.com/andreypopp/typescript-loader): Loads TypeScript like JavaScript.\r\n\r\n**templating**\r\n* [`html`](https://github.com/webpack/html-loader): Exports HTML as string, require references to static resources.\r\n* [`jade`](https://github.com/webpack/jade-loader): Loads jade template and returns a function\r\n* [`handlebars`](https://github.com/altano/handlebars-loader): Loads handlebars template and returns a function\r\n* [`ractive`](https://github.com/rstacruz/ractive-loader): Pre-compiles Ractive templates for interactive DOM manipulation\r\n* [`markdown`](https://github.com/peerigon/markdown-loader): Compiles Markdown to HTML\r\n* [`ng-cache`](https://github.com/teux/ng-cache-loader): Puts HTML partials in the Angular's $templateCache\r\n\r\n**styling**\r\n* [`style`](https://github.com/webpack/style-loader): Add exports of a module as style to DOM\r\n* [`css`](https://github.com/webpack/css-loader): Loads css file with resolved imports and returns css code\r\n* [`cssnext`](https://github.com/cssnext/cssnext-loader): Loads and compiles a css file using [cssnext](http://cssnext.io/)\r\n* [`less`](https://github.com/webpack/less-loader): Loads and compiles a less file\r\n* [`sass`](https://github.com/jtangelder/sass-loader): Loads and compiles a scss file\r\n* [`stylus`](https://github.com/shama/stylus-loader): Loads and compiles a stylus file\r\n\r\n**misc**\r\n* [`po`](https://github.com/dschissler/po-loader): Loads a PO gettext file and returns JSON\r\n* [`mocha`](https://github.com/webpack/mocha-loader): Do tests with mocha in browser or node.js\r\n* [`eslint`](https://github.com/MoOx/eslint-loader): PreLoader for linting code using ESLint.\r\n* [`jshint`](https://github.com/webpack/jshint-loader): PreLoader for linting code.\r\n* [`jscs`](https://github.com/unindented/jscs-loader): PreLoader for style checking.\r\n* [`injectable`](https://github.com/jauco/webpack-injectable): Allow to inject dependencies into modules\r\n* [`transform`](https://github.com/webpack/transform-loader): Use browserify transforms as loader.\r\n\r\nFor the full list of loaders, see [list of loaders](https://webpack.github.io/docs/list-of-loaders.html).\r\n\r\n## Module Format (AMD/CommonJS)\r\n\r\nwebpack supports **both** AMD and CommonJS module styles. It performs clever static\r\nanalysis on the AST of your code. It even has an evaluation engine to evaluate\r\nsimple expressions. This allows you to **support most existing libraries** out of the box.\r\n\r\n## Code Splitting\r\n\r\nwebpack allows you to split your codebase into multiple chunks. Chunks are\r\nloaded asynchronously at runtime. This reduces the initial loading time.\r\n\r\n[Code Splitting documentation](https://webpack.github.io/docs/code-splitting.html)\r\n\r\n## Optimizations\r\n\r\nwebpack can do many optimizations to **reduce the output size of your\r\nJavaScript** by deduplicating frequently used modules, minifying, and giving\r\nyou full control of what is loaded initially and what is loaded at runtime\r\nthrough code splitting. It can also can make your code chunks **cache\r\nfriendly** by using hashes.\r\n\r\n[Optimization documentation](https://webpack.github.io/docs/optimization.html)\r\n\r\nwebpack optimizes in several ways. It also makes your chunks **cache-friendly** by using hashes.\r\n\r\n# A small example of what's possible\r\n\r\n``` javascript\r\n// webpack is a module bundler.\r\n// This means webpack takes modules with dependencies\r\n// and emits static assets representing those modules.\r\n\r\n// Dependencies can be written in CommonJs\r\nvar commonjs = require(\"./commonjs\");\r\n// or in AMD\r\ndefine([\"amd-module\", \"../file\"], function (amdModule, file) {\r\n\t// while previous constructs are sync,\r\n\t// this is async\r\n\trequire([\"big-module/big/file\"], function (big) {\r\n\t\t // For async dependencies, webpack splits\r\n\t\t // your application into multiple \"chunks\".\r\n\t\t // This part of your application is\r\n\t\t // loaded on demand (code-splitting).\r\n\t\tvar stuff = require(\"../my/stuff\");\r\n\t\t// \"../my/stuff\" is also loaded on-demand\r\n\t\t// because it's in the callback function\r\n\t\t// of the AMD require.\r\n\t});\r\n});\r\n\r\n\r\nrequire(\"coffee!./cup.coffee\");\r\n// \"Loaders\" are used to preprocess files.\r\n// They can be prefixed in the require call\r\n// or configured in the configuration.\r\nrequire(\"./cup\");\r\n// This does the same when you add \".coffee\" to the extensions\r\n// and configure the \"coffee\" loader for /\\.coffee$/\r\n\r\nfunction loadTemplate (name) {\r\n\treturn require(\"./templates/\" + name + \".jade\");\r\n\t// Many expressions are supported in require calls.\r\n\t// A clever parser extracts information and concludes\r\n\t// that everything in \"./templates\" that matches\r\n\t// /\\.jade$/ should be included in the bundle, as it\r\n\t// can be required.\r\n}\r\n\r\n\r\n// ...and you can combine everything.\r\nfunction loadTemplateAsync (name, callback) {\r\n\trequire([\"bundle?lazy!./templates/\" + name + \".jade\"],\r\n\t function (templateBundle) {\r\n\t templateBundle(callback);\r\n\t});\r\n}\r\n```\r\n\r\n## Documentation\r\n\r\n[documentation](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=documentation)\r\n\r\n\r\n## Changelog\r\n\r\n[changelog](https://webpack.github.io/docs/changelog.html)\r\n\r\n\r\n## Tests\r\n\r\nYou can run the Node tests with `npm test`.\r\n\r\nYou can run the browser tests:\r\n\r\n```\r\ncd test/browsertests\r\nnode build\r\n```\r\n\r\nand open `tests.html` in the browser.\r\n\r\n## Contribution\r\n\r\nMost of the time, if webpack is not working correctly for you it is a simple configuration issue.\r\n\r\nIf you are still having difficulty after looking over your configuration carefully, please post\r\na question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions\r\nthat include your webpack.config.js and relevant files are more likely to receive responses.\r\n\r\nIf you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.\r\n\r\nIf you create a loader or plugin, please consider open sourcing it, putting it\r\non NPM and following the `x-loader`, `x-plugin` convention.\r\n\r\nYou are also welcome to correct any spelling mistakes or any language issues.\r\n\r\nIf you want to discuss something or just need help, [here is our gitter.im room](https://gitter.im/webpack/webpack).\r\n\r\n## License\r\n\r\nCopyright (c) 2012-2015 Tobias Koppers\r\n\r\nMIT (http://www.opensource.org/licenses/mit-license.php)\r\n\r\n## Thanks to\r\n\r\n(In chronological order)\r\n\r\n* @google for [Google Web Toolkit (GWT)](https://code.google.com/p/google-web-toolkit), which aims to compile Java to JavaScript. It features a similar [Code Splitting](https://code.google.com/p/google-web-toolkit/wiki/CodeSplitting) as webpack.\r\n* @medikoo for [modules-webmake](https://github.com/medikoo/modules-webmake), which is a similar project. webpack was born because I wanted Code Splitting for modules-webpack. Interestingly the [Code Splitting issue is still open](https://github.com/medikoo/modules-webmake/issues/7) (thanks also to @Phoscur for the discussion).\r\n* @substack for [browserify](http://browserify.org/), which is a similar project and source for many ideas.\r\n* @jrburke for [require.js](http://requirejs.org/), which is a similar project and source for many ideas.\r\n* @defunctzombie for the [browser-field spec](https://gist.github.com/defunctzombie/4339901), which makes modules available for node.js, browserify and webpack.\r\n* Every early webpack user, which contributed to webpack by writing issues or PRs. You influenced the direction...\r\n* @shama, @jhnns and @sokra for maintaining this project\r\n* Everyone who has written a loader for webpack. You are the ecosystem...\r\n* Everyone I forgot to mention here, but also influenced webpack.\r\n\r\n\r\n## Sponsor\r\n\r\nThis is a free-time project. The time I invest in it fluctuates. If you use webpack for a serious task, and you'd like me to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth.\r\n\r\nI'm very thankful for every dollar. If you leave your username or email, I may show my thanks by giving you extra support.\r\n\r\n\r\n## Dependencies\r\n\r\n* [esprima](http://esprima.org/)\r\n* [enhanced-resolve](https://github.com/webpack/enhanced-resolve)\r\n* [uglify-js](https://github.com/mishoo/UglifyJS)\r\n* [mocha](https://github.com/visionmedia/mocha)\r\n* [should](https://github.com/visionmedia/should.js)\r\n* [optimist](https://github.com/substack/node-optimist)\r\n* [async](https://github.com/caolan/async)\r\n* [mkdirp](https://github.com/substack/node-mkdirp)\r\n* [clone](https://github.com/pvorb/node-clone)\r\n\r\n\r\n[travis-url]: http://travis-ci.org/webpack/webpack\r\n[travis-image]: https://img.shields.io/travis/webpack/webpack.svg\r\n[appveyor-url]: https://ci.appveyor.com/project/sokra/webpack/branch/master\r\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true\r\n[coveralls-url]: https://coveralls.io/r/webpack/webpack/\r\n[coveralls-image]: https://img.shields.io/coveralls/webpack/webpack.svg\r\n[npm-url]: https://npmjs.org/package/webpack\r\n[npm-image]: https://img.shields.io/npm/v/webpack.svg\r\n[downloads-image]: http://img.shields.io/npm/dm/webpack.svg\r\n[downloads-url]: http://badge.fury.io/js/webpack\r\n[david-url]: https://david-dm.org/webpack/webpack\r\n[david-image]: https://img.shields.io/david/webpack/webpack.svg\r\n[david-dev-url]: https://david-dm.org/webpack/webpack#info=devDependencies\r\n[david-dev-image]: https://david-dm.org/webpack/webpack/dev-status.svg\r\n[david-peer-url]: https://david-dm.org/webpack/webpack#info=peerDependencies\r\n[david-peer-image]: https://david-dm.org/webpack/webpack/peer-status.svg\r\n[nodei-image]: https://nodei.co/npm/webpack.png?downloads=true&downloadRank=true&stars=true\r\n[nodei-url]: https://nodei.co/npm/webpack\r\n[donate-url]: http://sokra.github.io/\r\n[donate-image]: https://img.shields.io/badge/donate-sokra-brightgreen.svg\r\n[gratipay-url]: https://gratipay.com/webpack/\r\n[gratipay-image]: https://img.shields.io/gratipay/webpack.svg\r\n[gitter-url]: https://gitter.im/webpack/webpack\r\n[gitter-image]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg\r\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/webpack/webpack.git" }, "scripts": { "beautify": "node ./scripts/beautify-rewrite", "beautify-lint": "node ./scripts/beautify-check", "cover": "istanbul cover -x *.runtime.js node_modules/mocha/bin/_mocha", "lint": "eslint lib bin hot scripts", "precover": "npm run lint && npm run beautify-lint", "pretest": "npm run lint && npm run beautify-lint", "publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish", "test": "mocha", "travis": "npm run cover -- --report lcovonly" }, "version": "1.12.11", "web": "lib/webpack.web.js" }