Skip to content

Commit

Permalink
Merge pull request #86 from uptick/refactor/build-setup
Browse files Browse the repository at this point in the history
Refactor/build setup
  • Loading branch information
bor3ham committed Oct 7, 2019
2 parents 5163ed5 + 6fbf36a commit 43d1fba
Show file tree
Hide file tree
Showing 8 changed files with 1,035 additions and 1,179 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ demo-site/_site/
/renderers.js
/utils.js
/icons.js
styles/
coverage/
.vscode/
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js

node_js: 8.10.0
node_js: 10.16.3

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ yarn add react-object-list
```
Ensure you have all peer dependencies installed
```
yarn add classnames moment prop-types react-day-picker react-month-picker react-select
yarn add classnames moment prop-types react-month-picker react-select
```


Expand Down
22 changes: 15 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,28 @@
"files": [
"main.js",
"styles",
"dist",
"filters.js",
"cells.js",
"renderers.js",
"utils.js",
"icons.js"
"icons.js",
"src/resources/colours.sass",
"src/resources/dark-table.sass",
"src/resources/input-range.sass",
"src/resources/main.sass"
],
"main": "main.js",
"scripts": {
"publish-demo": "git branch -D gh-pages; git push origin --delete gh-pages; git checkout -b gh-pages; cd demo-site; yarn; npm run build; cd ..; git add .; git add -f demo-site/dist; git add -f demo-site/node_modules/uptick-demo-site/dist; git commit -m \"Demo site build\"; git push origin gh-pages; git checkout master; git push origin `git subtree split --prefix demo-site gh-pages`:gh-pages --force;",
"build": "webpack --mode production",
"build:js": "webpack --mode production",
"build:css": "mkdir -p dist && npx node-sass src/resources/main.sass > dist/react-object-table.css",
"build": "yarn build:js && yarn build:css",
"dev": "webpack --mode development",
"watch": "webpack --mode development --watch",
"test": "jest",
"storybook": "start-storybook -p 9001 -c .storybook",
"prepublish": "yarn build && mkdir -p styles && cp src/resources/*.sass styles"
"prepare": "yarn build"
},
"author": "Uptick Pty Ltd (http://uptickhq.com)",
"license": "MIT",
Expand All @@ -37,7 +44,7 @@
"@storybook/addons": "^4.0.0-alpha.8",
"@storybook/react": "^4.0.0-alpha.8",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-eslint": "^10.0.3",
"babel-loader": "^7.1.4",
"babel-plugin-require-context-hook": "^1.0.0",
"babel-polyfill": "^6.26.0",
Expand All @@ -63,12 +70,11 @@
"file-loader": "^1.1.11",
"jest": "^22.4.2",
"moment": "^2.21.0",
"node-sass": "^4.7.2",
"node-sass": "^4.12.0",
"peer-deps-externals-webpack-plugin": "^1.0.2",
"prop-types": "^15.6.1",
"raf": "^3.4.0",
"react": "^16.2.0",
"react-day-picker": "^7.1.1",
"react-dom": "^16.2.0",
"react-month-picker": "^1.3.5",
"react-select": "^2.4.2",
Expand All @@ -85,9 +91,11 @@
"moment": "^2.21.0",
"prop-types": "^15.6.1",
"react": "15.x - 16.x",
"react-day-picker": "^7.1.1",
"react-dom": "15.x - 16.x",
"react-month-picker": "^1.3.5",
"react-select": "^2.0.0-beta.6"
},
"dependencies": {
"react-day-picker": "^7.1.1"
}
}
2 changes: 1 addition & 1 deletion src/filters/types/__tests__/Choice.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('Choice', () => {
const loadSpy = jasmine.createSpy()
const instance = shallow(<Choice {...baseProps} remote loadOptions={loadSpy} />).instance()
instance.scheduleLoadOptions(1, 2)
expect(setTimeout).toHaveBeenCalledTimes(1)
expect(setTimeout).toHaveBeenCalledTimes(2)
expect(setTimeout).toHaveBeenLastCalledWith(expect.any(Function), 450)
expect(typeof instance.state.fetchScheduled).toBe('number')
expect(instance.state.fetchScheduled % 1).toBe(0)
Expand Down
2 changes: 1 addition & 1 deletion src/filters/types/__tests__/Search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Search', () => {
it('schedules update', () => {
instance.setState({currentValue: 'Bob', updateScheduled: null})
instance.scheduleUpdate()
expect(setTimeout).toHaveBeenCalledTimes(1)
expect(setTimeout).toHaveBeenCalledTimes(2)
expect(setTimeout).toHaveBeenLastCalledWith(expect.any(Function), baseProps.updateDelay)
expect(typeof instance.state.updateScheduled).toBe('number')
expect(instance.state.updateScheduled % 1).toBe(0)
Expand Down
3 changes: 0 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ module.exports = {
],
}],
},
externals: [
/react-day-picker.*/,
],
plugins: [
extractSass,
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
Expand Down

0 comments on commit 43d1fba

Please sign in to comment.