react-checkbox-tree
Advanced tools
Comparing version 1.0.0 to 1.0.1
# CHANGELOG | ||
## [v1.0.1](https://github.com/jakezatecky/react-checkbox-tree/compare/v1.0.0...v1.0.1) (2017-09-30) | ||
### Dependencies | ||
* [#54]: Add support for React 16 | ||
## [v1.0.0](https://github.com/jakezatecky/react-checkbox-tree/compare/v0.6.4...v1.0.0) (2017-09-21) | ||
@@ -4,0 +10,0 @@ |
103
gulpfile.js
@@ -18,18 +18,23 @@ const gulp = require('gulp'); | ||
gulp.task('test-script-format', () => ( | ||
gulp.src(['./src/js/**/*.js']) | ||
.pipe(eslint()) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failOnError()) | ||
gulp.src([ | ||
'./examples/src/**.js', | ||
'./src/**/*.js', | ||
'./test/**/*.js', | ||
'./*.js', | ||
]) | ||
.pipe(eslint()) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failOnError()) | ||
)); | ||
gulp.task('test-mocha', ['test-script-format'], () => ( | ||
gulp.src(['./test/**/*.js']) | ||
.pipe(mocha({ | ||
compilers: [ | ||
'js:babel-core/register', | ||
], | ||
require: [ | ||
'./test/setup.js', | ||
], | ||
})) | ||
gulp.src(['./test/**/*.js']) | ||
.pipe(mocha({ | ||
compilers: [ | ||
'js:babel-core/register', | ||
], | ||
require: [ | ||
'./test/setup.js', | ||
], | ||
})) | ||
)); | ||
@@ -40,19 +45,19 @@ | ||
gulp.task('build-script', ['test'], () => ( | ||
gulp.src(['./src/index.js']) | ||
.pipe(webpackStream(webpackConfig, webpack)) | ||
.pipe(header(banner, { pkg })) | ||
.pipe(gulp.dest('./lib/')) | ||
gulp.src(['./src/index.js']) | ||
.pipe(webpackStream(webpackConfig, webpack)) | ||
.pipe(header(banner, { pkg })) | ||
.pipe(gulp.dest('./lib/')) | ||
)); | ||
gulp.task('build-style', () => ( | ||
gulp.src('./src/scss/**/*.scss') | ||
.pipe(scsslint()) | ||
.pipe(scsslint.failReporter()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded', | ||
}).on('error', sass.logError)) | ||
.pipe(autoprefixer({ | ||
browsers: ['last 2 versions'], | ||
})) | ||
.pipe(gulp.dest('./lib')) | ||
gulp.src('./src/scss/**/*.scss') | ||
.pipe(scsslint()) | ||
.pipe(scsslint.failReporter()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded', | ||
}).on('error', sass.logError)) | ||
.pipe(autoprefixer({ | ||
browsers: ['last 2 versions'], | ||
})) | ||
.pipe(gulp.dest('./lib')) | ||
)); | ||
@@ -63,36 +68,36 @@ | ||
gulp.task('build-examples-style', () => ( | ||
gulp.src('./examples/src/scss/**/*.scss') | ||
.pipe(scsslint()) | ||
.pipe(scsslint.failReporter()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded', | ||
}).on('error', sass.logError)) | ||
.pipe(autoprefixer({ | ||
browsers: ['last 2 versions'], | ||
})) | ||
.pipe(gulp.dest('./examples/dist')) | ||
.pipe(browserSync.stream()) | ||
gulp.src('./examples/src/scss/**/*.scss') | ||
.pipe(scsslint()) | ||
.pipe(scsslint.failReporter()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded', | ||
}).on('error', sass.logError)) | ||
.pipe(autoprefixer({ | ||
browsers: ['last 2 versions'], | ||
})) | ||
.pipe(gulp.dest('./examples/dist')) | ||
.pipe(browserSync.stream()) | ||
)); | ||
gulp.task('build-examples-script', () => ( | ||
gulp.src(['./examples/src/index.js']) | ||
.pipe(webpackStream(testWebpackConfig, webpack)) | ||
.pipe(gulp.dest('./examples/dist/')) | ||
.pipe(browserSync.stream()) | ||
gulp.src(['./examples/src/index.js']) | ||
.pipe(webpackStream(testWebpackConfig, webpack)) | ||
.pipe(gulp.dest('./examples/dist/')) | ||
.pipe(browserSync.stream()) | ||
)); | ||
gulp.task('build-examples-html', () => ( | ||
gulp.src('./examples/src/index.html') | ||
.pipe(gulp.dest('./examples/dist/')) | ||
.pipe(browserSync.stream()) | ||
gulp.src('./examples/src/index.html') | ||
.pipe(gulp.dest('./examples/dist/')) | ||
.pipe(browserSync.stream()) | ||
)); | ||
gulp.task('examples', ['build-examples-style', 'build-examples-script', 'build-examples-html'], () => { | ||
browserSync.init({ server: './examples/dist' }); | ||
browserSync.init({ server: './examples/dist' }); | ||
gulp.watch(['./src/js/**/*.js', './examples/src/**/*.js'], ['build-examples-script']); | ||
gulp.watch(['./src/scss/**/*.scss', './examples/src/**/*.scss'], ['build-examples-style']); | ||
gulp.watch(['./examples/src/**/*.html'], ['build-examples-html']).on('change', browserSync.reload); | ||
gulp.watch(['./src/js/**/*.js', './examples/src/**/*.js'], ['build-examples-script']); | ||
gulp.watch(['./src/scss/**/*.scss', './examples/src/**/*.scss'], ['build-examples-style']); | ||
gulp.watch(['./examples/src/**/*.html'], ['build-examples-html']).on('change', browserSync.reload); | ||
}); | ||
gulp.task('default', ['build']); |
{ | ||
"name": "react-checkbox-tree", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A simple and elegant checkbox tree for React.", | ||
@@ -27,3 +27,3 @@ "author": "Jake Zatecky", | ||
"peerDependencies": { | ||
"react": "^15.3.0" | ||
"react": "^15.3.0 || ^16.0.0" | ||
}, | ||
@@ -39,5 +39,6 @@ "devDependencies": { | ||
"chai": "^4.0.0", | ||
"enzyme": "^2.7.1", | ||
"enzyme": "^3.0.0", | ||
"enzyme-adapter-react-16": "^1.0.0", | ||
"eslint": "^4.3.0", | ||
"eslint-config-takiyon-react": "^0.1.0", | ||
"eslint-config-takiyon-react": "^0.2.1", | ||
"eslint-import-resolver-webpack": "^0.8.1", | ||
@@ -56,6 +57,5 @@ "eslint-plugin-import": "^2.2.0", | ||
"mocha": "^3.0.2", | ||
"react": "^15.4.2", | ||
"react-addons-test-utils": "^15.4.2", | ||
"react-dom": "^15.4.2", | ||
"react-test-renderer": "^15.5.4", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-test-renderer": "^16.0.0", | ||
"webpack": "^3.0.0", | ||
@@ -62,0 +62,0 @@ "webpack-stream": "^4.0.0" |
@@ -200,3 +200,9 @@ import classNames from 'classnames'; | ||
renderTreeNodes(nodes, parent = {}) { | ||
const { disabled, expandDisabled, noCascade, optimisticToggle, showNodeIcon } = this.props; | ||
const { | ||
disabled, | ||
expandDisabled, | ||
noCascade, | ||
optimisticToggle, | ||
showNodeIcon, | ||
} = this.props; | ||
const treeNodes = nodes.map((node) => { | ||
@@ -203,0 +209,0 @@ const key = `${node.value}`; |
@@ -142,3 +142,11 @@ import classNames from 'classnames'; | ||
render() { | ||
const { checked, className, disabled, treeId, label, showNodeIcon, value } = this.props; | ||
const { | ||
checked, | ||
className, | ||
disabled, | ||
label, | ||
showNodeIcon, | ||
treeId, | ||
value, | ||
} = this.props; | ||
const inputId = `${treeId}-${value}`; | ||
@@ -145,0 +153,0 @@ const nodeClass = classNames({ |
module.exports = { | ||
output: { | ||
filename: 'index.js', | ||
libraryTarget: 'umd', | ||
library: 'ReactCheckboxTree', | ||
}, | ||
externals: [ | ||
{ | ||
react: { | ||
root: 'React', | ||
commonjs2: 'react', | ||
commonjs: 'react', | ||
amd: 'react', | ||
}, | ||
}, | ||
{ | ||
'react-dom': { | ||
root: 'ReactDOM', | ||
commonjs2: 'react-dom', | ||
commonjs: 'react-dom', | ||
amd: 'react-dom', | ||
}, | ||
}, | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js?$/, | ||
exclude: /(node_modules|bower_components|vender_modules)/, | ||
loader: 'babel-loader', | ||
}, | ||
], | ||
}, | ||
output: { | ||
filename: 'index.js', | ||
libraryTarget: 'umd', | ||
library: 'ReactCheckboxTree', | ||
}, | ||
externals: [ | ||
{ | ||
react: { | ||
root: 'React', | ||
commonjs2: 'react', | ||
commonjs: 'react', | ||
amd: 'react', | ||
}, | ||
}, | ||
{ | ||
'react-dom': { | ||
root: 'ReactDOM', | ||
commonjs2: 'react-dom', | ||
commonjs: 'react-dom', | ||
amd: 'react-dom', | ||
}, | ||
}, | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js?$/, | ||
exclude: /(node_modules|bower_components|vender_modules)/, | ||
loader: 'babel-loader', | ||
}, | ||
], | ||
}, | ||
}; |
const path = require('path'); | ||
module.exports = { | ||
output: { | ||
filename: 'index.js', | ||
libraryTarget: 'umd', | ||
library: 'ReactCheckboxTree', | ||
}, | ||
resolve: { | ||
alias: { | ||
'react-checkbox-tree': path.resolve(__dirname, 'src/js/CheckboxTree'), | ||
}, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js?$/, | ||
exclude: /(node_modules|bower_components|vender_modules)/, | ||
loader: 'babel-loader', | ||
}, | ||
], | ||
}, | ||
output: { | ||
filename: 'index.js', | ||
libraryTarget: 'umd', | ||
library: 'ReactCheckboxTree', | ||
}, | ||
resolve: { | ||
alias: { | ||
'react-checkbox-tree': path.resolve(__dirname, 'src/js/CheckboxTree'), | ||
}, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js?$/, | ||
exclude: /(node_modules|bower_components|vender_modules)/, | ||
loader: 'babel-loader', | ||
}, | ||
], | ||
}, | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
473883
4921
3