Skip to content

Commit

Permalink
Simplify build again
Browse files Browse the repository at this point in the history
  • Loading branch information
nkbt committed Sep 27, 2019
1 parent 88938e9 commit 815d452
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 243 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- run:
name: Check dependencies
command: yarn depcheck
command: yarn deps


- save_cache:
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@
]
},
"scripts": {
"build": "scripts/build.js",
"start": "scripts/dev.js",
"dist": "scripts/dist.js",
"ghPages": "scripts/ghPages.js",
"lib": "scripts/lib.js",
"lint": "scripts/lint.js",
"pub": "scripts/pub.js",
"test": "scripts/test.js",
"prepare": "scripts/build.js",
"build": "yarn lib && yarn dist",
"start": "NODE_ENV=development webpack-dev-server --config ./webpack/dev.config.js",
"predist": "rm -rf ./build",
"dist": "NODE_ENV=production webpack-cli --config ./webpack/dist.config.js && NODE_ENV=production webpack-cli --config ./webpack/min.config.js",
"preghPages": "yarn pub",
"ghPages": "gh-pages --dist ./pub --repo https://github.com/nkbt/react-collapse.git --branch gh-pages --message 'Publish examples' ",
"prelib": "rm -rf ./lib",
"lib": "NODE_ENV=production babel src --out-dir lib",

"lint": "eslint .",
"prepub": "rm -rf ./pub",
"pub": "NODE_ENV=production webpack-cli --config ./webpack/pub.config.js",
"test": "node test/Collapse-test.js",
"prepublishOnly": "yarn build",
"postversion": "git push --follow-tags",
"nuke": "rm -rf node_modules yarn.lock",
"postnuke": "yarn install",
"depcheck": "! depcheck --ignore-dirs=build,lib,pub | grep --invert-match 'No depcheck issue'"
"deps": "! depcheck --specials=bin,eslint --ignore-dirs=build,lib,pub | grep --invert-match 'No depcheck issue'"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -69,14 +74,12 @@
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"gh-pages": "^2.1.1",
"glob": "^7.1.4",
"html-webpack-include-assets-plugin": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.8.0",
"prop-types": "^15.7.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"rimraf": "^3.0.0",
"style-loader": "^1.0.0",
"tape": "^4.11.0",
"webpack": "^4.41.0",
Expand Down
5 changes: 0 additions & 5 deletions scripts/build.js

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/dev.js

This file was deleted.

17 changes: 0 additions & 17 deletions scripts/dist.js

This file was deleted.

23 changes: 0 additions & 23 deletions scripts/ghPages.js

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/lib.js

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/lint.js

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/pub.js

This file was deleted.

36 changes: 0 additions & 36 deletions scripts/test.js

This file was deleted.

50 changes: 0 additions & 50 deletions scripts/utils/bash.js

This file was deleted.

49 changes: 0 additions & 49 deletions scripts/utils/ci.js

This file was deleted.

26 changes: 24 additions & 2 deletions test/Collapse-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
import test from 'tape';
import {Collapse} from '../src/Collapse';
const babel = require('@babel/register');

babel({
babelrc: false,
plugins: [
require.resolve('@babel/plugin-proposal-object-rest-spread'),
require.resolve('@babel/plugin-proposal-class-properties')
],
presets: [
require.resolve('@babel/preset-react'),
[require.resolve('@babel/preset-env'), {
targets: {
node: '10'
},
modules: 'commonjs',
loose: true
}]
],
retainLines: true,
comments: false
});

const test = require('tape');
const {Collapse} = require('../src/Collapse');

test('Collapse', t => {
t.ok(Collapse instanceof Function, 'should be function');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 815d452

Please sign in to comment.