forked from JedWatson/react-select
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request JedWatson#1953 from JedWatson/feature/new-build-pr…
…ocess New build pipeline for react-select
- Loading branch information
Showing
23 changed files
with
271 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ignore": ["node-modules/**", "src/index.umd.js"], | ||
"presets": ["stage-0", "react"], | ||
"env": { | ||
"test": { | ||
"presets": ["es2015"], | ||
"plugins": ["istanbul"], | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"reporter": [ | ||
"lcov", | ||
"text-summary" | ||
], | ||
"require": [ | ||
"babel-register" | ||
], | ||
"sourceMap": false, | ||
"instrument": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ <h2>Standalone bulid</h2> | |
</div> | ||
<script src="//unpkg.com/[email protected]/dist/react.min.js"></script> | ||
<script src="//unpkg.com/[email protected]/dist/react-dom.min.js"></script> | ||
<script src="//unpkg.com/[email protected]/build/three.min.js"></script> | ||
<script src="//unpkg.com/[email protected]/index.js"></script> | ||
<script src="//unpkg.com/[email protected]/prop-types"></script> | ||
<script src="//unpkg.com/[email protected]/dist/react-input-autosize.min.js"></script> | ||
<script src="standalone.js"></script> | ||
<script src="../../dist/react-select.js"></script> | ||
<script> | ||
var options = [ | ||
{ label: 'One', value: 1 }, | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.Creatable = exports.AsyncCreatable = exports.Async = undefined; | ||
|
||
var _Select = require('./Select'); | ||
|
||
var _Select2 = _interopRequireDefault(_Select); | ||
|
||
var _Async = require('./Async'); | ||
|
||
var _Async2 = _interopRequireDefault(_Async); | ||
|
||
var _AsyncCreatable = require('./AsyncCreatable'); | ||
|
||
var _AsyncCreatable2 = _interopRequireDefault(_AsyncCreatable); | ||
|
||
var _Creatable = require('./Creatable'); | ||
|
||
var _Creatable2 = _interopRequireDefault(_Creatable); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
_Select2.default.Async = _Async2.default; | ||
_Select2.default.AsyncCreatable = _AsyncCreatable2.default; | ||
_Select2.default.Creatable = _Creatable2.default; | ||
|
||
exports.default = _Select2.default; | ||
exports.Async = _Async2.default; | ||
exports.AsyncCreatable = _AsyncCreatable2.default; | ||
exports.Creatable = _Creatable2.default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const npsUtils = require('nps-utils'); | ||
const path = require('path'); | ||
const series = npsUtils.series; | ||
const rimraf = npsUtils.rimraf; | ||
const concurrent = npsUtils.concurrent; | ||
|
||
module.exports = { | ||
scripts: { | ||
build: { | ||
description: 'clean dist directory and run all builds', | ||
default: series( | ||
rimraf('dist'), | ||
rimraf('lib'), | ||
concurrent.nps('build.css', 'build.min'), | ||
concurrent.nps('build.umd', 'build.umdMin', 'build.es', 'build.standalone') | ||
), | ||
umd: 'rollup --config', | ||
umdMin: 'rollup --config --environment MINIFY', | ||
es: 'babel src -d lib', | ||
css: 'lessc less/default.less dist/react-select.css', | ||
min: 'lessc --clean-css less/default.less dist/react-select.min.css', | ||
standalone: series( | ||
'cp examples/src/standalone.html examples/dist/standalone.html', | ||
'lessc examples/src/example.less examples/dist/example.less' | ||
), | ||
examples: series( | ||
'webpack --progress -p', | ||
'cp examples/src/.gitignore examples/dist/.gitignore', | ||
'git subtree push --prefix examples/dist origin gh-pages' | ||
) | ||
}, | ||
publish: { | ||
default: series( | ||
rimraf('examples/dist'), | ||
concurrent.nps('build.examples') | ||
) | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
import babel from 'rollup-plugin-babel'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import uglify from 'rollup-plugin-uglify'; | ||
import { minify } from 'uglify-es'; | ||
const min = process.env.MINIFY; | ||
|
||
export default { | ||
input: 'src/index.umd.js', | ||
output: { | ||
name: 'Select', | ||
file: getDist(min), | ||
format: 'umd', | ||
}, | ||
globals: { | ||
react: 'React', | ||
'prop-types': 'PropTypes', | ||
'react-dom': 'ReactDOM', | ||
'react-input-autosize': 'AutosizeInput', | ||
'classnames': 'classNames', | ||
}, | ||
external: [ | ||
'classnames', | ||
'prop-types', | ||
'react-input-autosize', | ||
'react', | ||
'react-dom', | ||
], | ||
plugins: [ | ||
babel({ | ||
presets: [['es2015', { 'modules': false }]], | ||
plugins: ['external-helpers'] | ||
}), | ||
resolve(), | ||
min ? uglify({}, minify) : {}, | ||
] | ||
}; | ||
|
||
|
||
function getDist (min) { | ||
return min ? 'dist/react-select.min.js' : 'dist/react-select.js'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,4 +294,4 @@ CreatableSelect.propTypes = { | |
}; | ||
|
||
|
||
module.exports = CreatableSelect; | ||
export default CreatableSelect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Select from './Select'; | ||
import Async from './Async'; | ||
import AsyncCreatable from './AsyncCreatable'; | ||
import Creatable from './Creatable'; | ||
|
||
Select.Async = Async; | ||
Select.AsyncCreatable = AsyncCreatable; | ||
Select.Creatable = Creatable; | ||
|
||
export default Select; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,4 @@ function menuRenderer ({ | |
}); | ||
} | ||
|
||
module.exports = menuRenderer; | ||
export default menuRenderer; |
Oops, something went wrong.