Skip to content

Commit 3876be2

Browse files
committed
build(parcel): replace rollup with parcel 2
Building with rollup was tedious and we were unsure if we were targetting all platforms and bundles. Now we know becuase it does it all! BREAKING CHANGE: packagejson#module was removed because the file is no longer being generated.
1 parent f34c861 commit 3876be2

File tree

9 files changed

+1544
-823
lines changed

9 files changed

+1544
-823
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ temp
55
dist
66
# todo - get story book only when releasing.
77
storybook-static
8+
.parcel-cache

config/move-files.ts

-11
This file was deleted.

config/rollup.config.js

-29
This file was deleted.

config/tsconfig.rollup.json

-24
This file was deleted.

package.json

+13-17
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@
88
"version": "5.0.5",
99
"private": false,
1010
"main": "dist/index.js",
11-
"module": "dist/index.es.js",
1211
"types": "dist/index.d.ts",
1312
"files": [
1413
"dist"
1514
],
1615
"scripts": {
1716
"commit": "cz",
1817
"prepublishOnly": "yarn build",
19-
"start": "parcel examples/index.html --out-dir temp/server --cache-dir temp/cache ",
20-
"build": "yarn build:rollup && yarn build:tsc",
21-
"build:rollup": " rollup --config config/rollup.config.js",
22-
"build:tsc": "ts-node config/move-files.ts",
18+
"build": "yarn build:parcel",
2319
"build:storybook": "build-storybook",
24-
"storybook": "start-storybook -p 6006",
20+
"build:parcel": "parcel build ./src/index.ts",
21+
"serve": "npm-run-all --parallel serve:*",
22+
"serve:parcel": "parcel watch ./src/index.ts",
23+
"serve:storybook": "start-storybook -p 6006",
2524
"style": "yarn style:format && yarn style:lint",
2625
"style:format": "prettier -w src",
2726
"style:lint": "eslint src/**"
@@ -85,10 +84,10 @@
8584
"@commitlint/config-conventional": "^11.0.0",
8685
"@semantic-release/changelog": "^5.0.1",
8786
"@semantic-release/git": "^9.0.0",
88-
"@storybook/addon-actions": "^6.0.21",
89-
"@storybook/addon-essentials": "^6.0.21",
90-
"@storybook/addon-links": "^6.0.21",
91-
"@storybook/react": "^6.0.21",
87+
"@storybook/addon-actions": "^6.0.22",
88+
"@storybook/addon-essentials": "^6.0.22",
89+
"@storybook/addon-links": "^6.0.22",
90+
"@storybook/react": "^6.0.22",
9291
"@types/classnames": "^2.2.10",
9392
"@types/jest": "^26.0.14",
9493
"@types/node": "14.11.2",
@@ -97,25 +96,22 @@
9796
"@types/sortablejs": "^1.10.0",
9897
"@typescript-eslint/eslint-plugin": "^4.2.0",
9998
"@typescript-eslint/parser": "^4.2.0",
100-
"babel-loader": "^8.1.0",
10199
"commitizen": "^4.2.1",
102100
"copy-dir": "^1.3.0",
103101
"cz-conventional-changelog": "^3.3.0",
104-
"eslint": "^7.9.0",
102+
"eslint": "^7.10.0",
105103
"eslint-plugin-react": "^7.21.2",
106104
"husky": "^4.3.0",
107105
"jest": "^26.4.2",
108-
"parcel-bundler": "^1.12.4",
106+
"npm-run-all": "^4.1.5",
107+
"parcel": "^2.0.0-beta.1",
109108
"prettier": "^2.1.2",
110109
"react": "^16.13.1",
111110
"react-dom": "^16.13.1",
112111
"react-is": "^16.13.1",
113-
"rollup": "^2.28.2",
114-
"rollup-plugin-commonjs": "^10.1.0",
115-
"rollup-plugin-typescript2": "^0.27.2",
116112
"semantic-release": "^17.1.2",
117113
"sortablejs": "^1.10.0",
118-
"storybook": "^6.0.21",
114+
"storybook": "^6.0.22",
119115
"ts-jest": "^26.4.0",
120116
"ts-node": "^9.0.0",
121117
"typescript": "^4.0.3"

stories/multi-drag/multi-drag.stories.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
22
import { Meta } from "@storybook/react";
3-
import { ReactSortable, ReactSortableProps } from "../../src";
3+
import { ReactSortable } from "../../dist";
4+
import { ReactSortableProps } from "../../src";
45
import { ULLITemplate, ULLITemplateProps } from "../templates/ul-li";
56

67
export default {

stories/unary-lists/simple-list.stories.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
22
import { Meta } from "@storybook/react";
3-
import { ReactSortableProps, ReactSortable } from "../../src";
3+
import { ReactSortable } from "../../dist";
4+
import { ReactSortableProps } from "../../src";
45
import { ULLITemplate, ULLITemplateProps } from "../templates/ul-li";
56

67
export default {

tsconfig.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"compilerOptions": {
3-
"incremental": true, /* Enable incremental compilation */
4-
"strict": true, /* Enable all strict type-checking options. */
5-
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
6-
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7-
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
8-
"allowSyntheticDefaultImports": true,
9-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
10-
"strictNullChecks": true
3+
"strict": true,
4+
"target": "es5",
5+
"esModuleInterop": true,
6+
"jsx": "react",
7+
"resolveJsonModule": true,
8+
"sourceMap": true,
9+
"lib": ["es2015", "DOM"]
1110
},
12-
}
11+
"include": ["src"]
12+
}

0 commit comments

Comments
 (0)