Skip to content

Commit

Permalink
Merge pull request #36 from LouisBrunner/feature/improve_build
Browse files Browse the repository at this point in the history
Improve build
  • Loading branch information
LouisBrunner authored Oct 14, 2019
2 parents d73b292 + a7a4723 commit bfb728a
Show file tree
Hide file tree
Showing 42 changed files with 776 additions and 726 deletions.
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/examples
/dist
/coverage
/packages/*/lib
/packages/*/dist
**/node_modules
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ node_modules
# Code coverage
/.nyc_output
/coverage

# Examples
/examples/*.js
/dist
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
webpack.config.js

# Output
/dist
/examples

# npm
Expand Down
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ script:

after_success:
- npm run travis:coverage
- npm run build:examples
- touch .nojekyll # See https://github.com/zeit/next.js/wiki/Deploying-a-Next.js-app-into-GitHub-Pages#add-a-nojekyll-file

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This project also contains some helpers (available standalone or included in oth

## Thanks

Thanks to the [React DnD HTML5 Backend](https://github.com/gaearon/react-dnd-html5-backend) maintainers which obviously greatly inspired this project.
Thanks to the [React DnD HTML5 Backend](https://github.com/react-dnd/react-dnd) maintainers which obviously greatly inspired this project.


## License
Expand Down
13 changes: 7 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const generatePresets = ({modules} = {}) => {
const generatePresets = ({ modules } = {}) => {
return [
['@babel/preset-env', {
modules: modules ? 'commonjs' : undefined,
modules,
targets: {
browsers: [
'> 1%',
Expand All @@ -15,14 +15,15 @@ const generatePresets = ({modules} = {}) => {
};

module.exports = {
presets: generatePresets({modules: false}),
// eslint-disable-next-line no-process-env
presets: generatePresets({ modules: process.env.CJS === 'yes' ? 'commonjs' : false }),
env: {
test: {
presets: generatePresets({modules: true}),
presets: generatePresets({ modules: 'commonjs' }),
},
},
plugins: [
['@babel/plugin-proposal-decorators', {legacy: true}],
['@babel/plugin-proposal-class-properties', {loose: true}],
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
],
};
10 changes: 0 additions & 10 deletions dev/dnd-multi-backend.html

This file was deleted.

14 changes: 0 additions & 14 deletions dev/index.html

This file was deleted.

19 changes: 0 additions & 19 deletions dev/react-dnd-multi-backend.html

This file was deleted.

10 changes: 0 additions & 10 deletions dev/react-dnd-preview.html

This file was deleted.

1 change: 0 additions & 1 deletion dist/RDMBHTML5toTouch.min.js

This file was deleted.

9 changes: 0 additions & 9 deletions dist/ReactDnDMultiBackend.min.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/dnd-multi-backend.min.js

This file was deleted.

9 changes: 0 additions & 9 deletions dist/react-dnd-preview.min.js

This file was deleted.

1 change: 0 additions & 1 deletion examples/examples_dnd-multi-backend.min.js

This file was deleted.

43 changes: 0 additions & 43 deletions examples/examples_react-dnd-multi-backend.min.js

This file was deleted.

43 changes: 0 additions & 43 deletions examples/examples_react-dnd-preview.min.js

This file was deleted.

3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const glob = require('glob');

module.exports = {
transformIgnorePatterns: [
'/node_modules/(?!(dnd-core|react-dnd|react-dnd-test-backend))',
],
setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
collectCoverage: true,
coverageReporters: process.env.CI ? ['lcov'] : ['text', 'text-summary', 'html'], // eslint-disable-line no-process-env
Expand Down
Loading

0 comments on commit bfb728a

Please sign in to comment.