Skip to content

Commit 30773bd

Browse files
authored
chore: refactor pipeline and update dependencies (#73)
* chore: refactor pipeline and update dependencies * refactor: convert Webpack config file to TS
1 parent fbf306c commit 30773bd

9 files changed

+1580
-1799
lines changed

Gruntfile.js

-56
This file was deleted.

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ yarn install
8484
8585
### Tasks
8686
87-
- `yarn start` - Starts the grunt watch daemon for development.
88-
- `yarn run lint` - Lints all files.
89-
- `yarn run build` - Builds a distribution version of the library.
90-
- `yarn run test` - Runs the unit tests.
87+
- `yarn start` - Starts Webpack in development/watch mode.
88+
- `yarn lint` - Lints all files.
89+
- `yarn build` - Builds a distribution version of the library.
90+
- `yarn test` - Runs the unit tests.
9191
9292
## Contributing
9393
@@ -107,16 +107,16 @@ Once you have done that:
107107
git flow release start "NEW_VERSION"
108108
yarn install
109109
./bump_version.sh OLD_VERSION NEW_VERSION
110-
yarn run build
111-
yarn run test
110+
yarn build
111+
yarn test
112112
git flow release finish "NEW_VERSION"
113113
```
114114
115115
# Test Coverage
116116
117117
Run:
118118
```bash
119-
yarn run test --coverage
119+
yarn test --coverage
120120
```
121121
122122
## License

dist/leanplum.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leanplum.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
22
"scripts": {
3-
"build": "grunt build",
4-
"clean": "grunt clean",
3+
"build": "yarn clean && cross-env NODE_ENV=production webpack",
4+
"clean": "rimraf dist",
55
"lint": "yarn eslint 'src/**/*.{ts,tsx}'",
6-
"start": "grunt",
6+
"start": "cross-env NODE_ENV=development webpack --watch",
77
"e2e-build": "cp ./dist/leanplum.min.js ./test/e2e/ && cp ./dist/sw/sw.min.js ./test/e2e/",
88
"e2e-serve": "yarn run e2e-build && http-server test/e2e -p 8989 -a localhost",
99
"e2e-deploy": "yarn run e2e-build && now deploy test/e2e",
1010
"test": "jest"
1111
},
1212
"license": "Apache-2.0",
1313
"devDependencies": {
14-
"@types/jest": "^25.1.1",
15-
"@types/node": "^13.5.0",
16-
"@typescript-eslint/eslint-plugin": "^2.28.0",
17-
"@typescript-eslint/parser": "^2.28.0",
14+
"@types/jest": "^25.2.1",
15+
"@types/node": "^13.13.4",
16+
"@types/webpack": "^4.41.12",
17+
"@typescript-eslint/eslint-plugin": "^2.29.0",
18+
"@typescript-eslint/parser": "^2.29.0",
1819
"chai": "^3.5.0",
20+
"cross-env": "^7.0.2",
1921
"dts-bundle": "^0.7.3",
2022
"eslint": "^6.8.0",
2123
"eslint-loader": "^4.0.0",
22-
"fork-ts-checker-webpack-plugin": "^4.0.4",
23-
"grunt": "^1.0.1",
24-
"grunt-contrib-clean": "^2.0.0",
25-
"grunt-contrib-jshint": "^1.1.0",
26-
"grunt-webpack": "^3.0.0",
24+
"fork-ts-checker-webpack-plugin": "^4.1.3",
2725
"http-server": "^0.12.1",
28-
"jest": "^25.1.0",
26+
"jest": "^25.4.0",
2927
"jsdom": "^9.12.0",
30-
"lodash.clonedeep": "^4.5.0",
3128
"lodash.isequal": "^4.5.0",
3229
"lodash.merge": "^4.6.2",
3330
"mock-local-storage": "^1.0.2",
31+
"rimraf": "^3.0.2",
3432
"sinon": "^2.1.0",
35-
"ts-jest": "^25.2.0",
36-
"ts-loader": "^6.2.1",
37-
"typescript": "^3.7.2",
33+
"ts-jest": "^25.4.0",
34+
"ts-loader": "^7.0.1",
35+
"ts-node": "^8.9.1",
36+
"typescript": "^3.8.3",
3837
"uglifyjs-webpack-plugin": "^2.2.0",
39-
"webpack": "^4.41.2"
38+
"webpack": "^4.43.0",
39+
"webpack-cli": "^3.3.11"
4040
},
4141
"name": "leanplum-sdk",
4242
"description": "This is the JavaScript SDK for Leanplum, allowing developers to access and integrate the functionality of Leanplum with applications and devices through JavaScript and HTML5. Leanplum is an application development platform that provides mobile A/B testing, messaging functionality, personalization, and more features for applications. ## Installation Add leanplum.js to your project: ```javascript <script type=\"text/javascript\" src=\"leanplum.js\"></script> ``` ## Usage Initialize Leanplum.",

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"allowJs": true,
4+
"allowSyntheticDefaultImports": true,
45
"declaration": true,
56
"esModuleInterop": true,
67
"lib": [

webpack.config.js

-114
This file was deleted.

0 commit comments

Comments
 (0)