File tree Expand file tree Collapse file tree 7 files changed +82
-8
lines changed Expand file tree Collapse file tree 7 files changed +82
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "stage" : 0 ,
3- "optional " : [ " runtime " ]
4- }
3+ "loose " : " all "
4+ }
Original file line number Diff line number Diff line change 11node_modules
22npm-debug.log
33.DS_Store
4+ dist
45lib
56coverage
67react.js
Original file line number Diff line number Diff line change 1+ # Change Log
2+ All notable changes to this project will be documented in this file.
3+ This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+ ## [Unreleased][unreleased]
6+ ### Added
7+ - Dist build script (borrowed from flummox) to create distribution ready builds of redux
8+ that can be used in a browser directly. `dist/` is ignored by git.
9+ - Configuration for `cdnjs` autoimport from npm.
10+
11+ ### Changed
12+ - Clean up package.json by removing the unused browserify section;
13+ - Remove envify and babel-runtime as they aren't being used;
14+ - A change log :)
15+
16+ [unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.11.1...HEAD
Original file line number Diff line number Diff line change 44 "description" : " Atomic Flux with hot reloading" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
7+ "browser" : " scripts/browser" ,
78 "build" : " scripts/build" ,
89 "clean" : " scripts/clean" ,
910 "lint" : " scripts/lint" ,
5354 "webpack-dev-server" : " ^1.8.2"
5455 },
5556 "dependencies" : {
56- "babel-runtime" : " ^5.5.8" ,
57- "envify" : " ^3.4.0" ,
5857 "invariant" : " ^2.0.0"
5958 },
60- "browserify" : {
61- "transform" : [
62- " envify"
59+ "npmName" : " redux" ,
60+ "npmFileMap" : [{
61+ "basePath" : " /dist/" ,
62+ "files" : [
63+ " *.js"
6364 ]
64- }
65+ }]
6566}
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+
3+ WEBPACK_CMD=node_modules/.bin/webpack
4+
5+ mkdir -p dist
6+
7+ $WEBPACK_CMD src/index.js dist/redux.js
8+ NODE_ENV=production $WEBPACK_CMD src/index.js dist/redux.min.js
9+
10+ $WEBPACK_CMD src/react.js dist/redux-react.js
11+ NODE_ENV=production $WEBPACK_CMD src/react.js dist/redux-react.min.js
12+
13+ $WEBPACK_CMD src/react-native.js dist/redux-react-native.js
14+ NODE_ENV=production $WEBPACK_CMD src/react-native.js dist/redux-react-native.min.js
Original file line number Diff line number Diff line change 22
33sh scripts/lint
44sh scripts/clean
5+ sh scripts/browser
56sh scripts/build
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var webpack = require ( 'webpack' ) ;
4+
5+ var plugins = [
6+ new webpack . DefinePlugin ( {
7+ 'process.env.NODE_ENV' : JSON . stringify ( process . env . NODE_ENV )
8+ } ) ,
9+ new webpack . optimize . OccurenceOrderPlugin ( )
10+ ] ;
11+
12+ if ( process . env . NODE_ENV === 'production' ) {
13+ plugins . push (
14+ new webpack . optimize . UglifyJsPlugin ( {
15+ compressor : {
16+ screw_ie8 : true ,
17+ warnings : false
18+ }
19+ } )
20+ ) ;
21+ }
22+
23+ module . exports = {
24+ externals : {
25+ 'react' : 'React' ,
26+ 'react-native' : 'React'
27+ } ,
28+ module : {
29+ loaders : [
30+ { test : / \. j s $ / , loaders : [ 'babel-loader' ] , exclude : / n o d e _ m o d u l e s / }
31+ ]
32+ } ,
33+ output : {
34+ library : 'Redux' ,
35+ libraryTarget : 'var'
36+ } ,
37+ plugins : plugins ,
38+ resolve : {
39+ extensions : [ '' , '.js' ]
40+ }
41+ } ;
You can’t perform that action at this time.
0 commit comments