Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit cba4c65

Browse files
committed
build(contributions): build on install
1 parent 725dfca commit cba4c65

File tree

4 files changed

+64
-83
lines changed

4 files changed

+64
-83
lines changed

package.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
]
2121
},
2222
"scripts": {
23-
"postinstall": "lerna link",
23+
"postinstall": "yarn build && lerna link",
2424
"bootstrap": "lerna bootstrap --use-workspaces",
2525
"build:dev": "yarn workspace @chakra-ui/vue run rollup --config rollup.dev.config.js",
2626
"build": "yarn workspace @chakra-ui/vue build",
@@ -47,14 +47,6 @@
4747
},
4848
"dependencies": {
4949
"@chakra-ui/vue": "^0.7.0-next.2",
50-
"@babel/core": "^7.9.0",
51-
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
52-
"@babel/plugin-transform-modules-commonjs": "^7.7.4",
53-
"@babel/plugin-transform-parameters": "^7.7.4",
54-
"@babel/preset-env": "^7.9.5",
55-
"@changesets/cli": "^2.7.1",
56-
"@commitlint/cli": "^8.2.0",
57-
"@commitlint/config-conventional": "^8.2.0",
5850
"@emotion/css": "^11.0.0",
5951
"@mdx-js/vue-loader": "^1.6.1",
6052
"@nuxtjs/dotenv": "^1.4.0",
@@ -70,28 +62,7 @@
7062
"@storybook/theming": "^5.2.8",
7163
"@storybook/vue": "^5.3.3",
7264
"@styled-system/css": "^5.0.23",
73-
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
74-
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2",
75-
"@vue/babel-preset-app": "^4.1.1",
76-
"@vue/babel-preset-jsx": "^1.1.2",
77-
"@vue/cli-plugin-babel": "^3.11.0",
78-
"@vue/cli-plugin-eslint": "^3.11.0",
79-
"@vue/cli-plugin-pwa": "^3.11.0",
80-
"@vue/cli-plugin-unit-jest": "^3.11.0",
81-
"@vue/eslint-config-standard": "^4.0.0",
82-
"@vue/test-utils": "1.0.0-beta.29",
8365
"aria-hidden": "^1.1.1",
84-
"babel-core": "7.0.0-bridge.0",
85-
"babel-helper-vue-jsx-merge-props": "^2.0.3",
86-
"babel-jest": "^23.6.0",
87-
"babel-loader": "^8.0.6",
88-
"babel-plugin-syntax-jsx": "^6.18.0",
89-
"babel-plugin-transform-es2015-for-of": "^6.23.0",
90-
"babel-plugin-transform-vue-jsx": "^3.7.0",
91-
"babel-preset-env": "^1.7.0",
92-
"babel-preset-es2015": "^6.24.1",
93-
"babel-preset-vue": "^2.0.2",
94-
"babelrc-rollup": "^3.0.0",
9566
"breadstick": "^0.2.14",
9667
"can-use-dom": "^0.1.0",
9768
"chakra-loader": "latest",
@@ -134,6 +105,14 @@
134105
"vue-template-compiler": "^2.6.11"
135106
},
136107
"devDependencies": {
108+
"@babel/core": "^7.9.0",
109+
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
110+
"@babel/plugin-transform-modules-commonjs": "^7.7.4",
111+
"@babel/plugin-transform-parameters": "^7.7.4",
112+
"@babel/preset-env": "^7.9.5",
113+
"@changesets/cli": "^2.7.1",
114+
"@commitlint/cli": "^8.2.0",
115+
"@commitlint/config-conventional": "^8.2.0",
137116
"@babel/cli": "^7.8.4",
138117
"@babel/runtime-corejs2": "^7.8.7",
139118
"@nuxtjs/eslint-config": "^3.0.0",
@@ -144,6 +123,17 @@
144123
"@testing-library/vue": "^4.1.0",
145124
"@vue/devtools": "^5.3.3",
146125
"babel-eslint": "^10.1.0",
126+
"babel-core": "7.0.0-bridge.0",
127+
"babel-helper-vue-jsx-merge-props": "^2.0.3",
128+
"babel-jest": "^23.6.0",
129+
"babel-loader": "^8.0.6",
130+
"babel-plugin-syntax-jsx": "^6.18.0",
131+
"babel-plugin-transform-es2015-for-of": "^6.23.0",
132+
"babel-plugin-transform-vue-jsx": "^3.7.0",
133+
"babel-preset-env": "^1.7.0",
134+
"babel-preset-es2015": "^6.24.1",
135+
"babel-preset-vue": "^2.0.2",
136+
"babelrc-rollup": "^3.0.0",
147137
"bundlesize": "^0.18.0",
148138
"cross-env": "^7.0.2",
149139
"eslint-config-prettier": "^6.10.0",
@@ -166,6 +156,16 @@
166156
"rollup-plugin-vue": "^5.1.4",
167157
"styled-system": "^5.1.2",
168158
"v-scroll-lock": "^1.1.0",
159+
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
160+
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2",
161+
"@vue/babel-preset-app": "^4.1.1",
162+
"@vue/babel-preset-jsx": "^1.1.2",
163+
"@vue/cli-plugin-babel": "^3.11.0",
164+
"@vue/cli-plugin-eslint": "^3.11.0",
165+
"@vue/cli-plugin-pwa": "^3.11.0",
166+
"@vue/cli-plugin-unit-jest": "^3.11.0",
167+
"@vue/eslint-config-standard": "^4.0.0",
168+
"@vue/test-utils": "1.0.0-beta.29",
169169
"vue-loader": "^15.7.1",
170170
"vue-lorem-ipsum": "^0.0.1",
171171
"watch": "^1.0.2"

packages/chakra-ui-core/rollup.config.js

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ const bannerTxt = `
8080

8181
const baseFolder = './src/'
8282

83-
const capitalize = (s) => {
84-
if (typeof s !== 'string') return ''
85-
return s.charAt(0).toUpperCase() + s.slice(1)
86-
}
87-
8883
const components = fs.readdirSync(baseFolder)
8984
.filter(f => fs.statSync(path.join(baseFolder, f)).isDirectory())
9085

@@ -100,7 +95,7 @@ const entries = {
10095
* Configurations
10196
*/
10297
export default () => {
103-
let config = [{
98+
const config = [{
10499
input: entries,
105100
output: {
106101
dir: 'dist/esm/',
@@ -118,32 +113,6 @@ export default () => {
118113
banner: bannerTxt
119114
},
120115
...commons
121-
},
122-
{
123-
input: './src/index.js',
124-
output: {
125-
file: 'dist/umd/index.js/',
126-
name: capitalize('chakra'),
127-
format: 'umd',
128-
exports: 'named',
129-
banner: bannerTxt,
130-
globals: {
131-
vue: 'Vue'
132-
}
133-
},
134-
...commons
135-
}
136-
]
137-
if (process.env.MINIFY === 'true') {
138-
config = config.filter(c => !!c.output.file)
139-
config.forEach((c) => {
140-
c.output.file = c.output.file.replace(/\.js/g, '.min.js')
141-
c.plugins.push(terser({
142-
output: {
143-
comments: '/^!/'
144-
}
145-
}))
146-
})
147-
}
116+
}]
148117
return config
149118
}

website/static/sw.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
// THIS FILE SHOULD NOT BE VERSION CONTROLLED
1+
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/workbox/workbox-sw.js')
2+
3+
// --------------------------------------------------
4+
// Configure
5+
// --------------------------------------------------
6+
7+
// Set workbox config
8+
workbox.setConfig({
9+
"debug": false
10+
})
11+
12+
// Start controlling any existing clients as soon as it activates
13+
workbox.core.clientsClaim()
14+
15+
// Skip over the SW waiting lifecycle stage
16+
workbox.core.skipWaiting()
17+
18+
workbox.precaching.cleanupOutdatedCaches()
19+
20+
// --------------------------------------------------
21+
// Precaches
22+
// --------------------------------------------------
23+
24+
// Precache assets
25+
26+
// --------------------------------------------------
27+
// Runtime Caching
28+
// --------------------------------------------------
29+
30+
// Register route handlers for runtimeCaching
31+
workbox.routing.registerRoute(new RegExp('/_nuxt/'), new workbox.strategies.CacheFirst ({}), 'GET')
32+
workbox.routing.registerRoute(new RegExp('/'), new workbox.strategies.NetworkFirst ({}), 'GET')

yarn.lock

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,25 +2299,6 @@
22992299
unique-filename "^1.1.1"
23002300
which "^1.3.1"
23012301

2302-
"@fortawesome/fontawesome-common-types@^0.2.28":
2303-
version "0.2.28"
2304-
resolved "https://npm.fontawesome.com/@fortawesome/fontawesome-common-types/-/0.2.28/fontawesome-common-types-0.2.28.tgz#1091bdfe63b3f139441e9cba27aa022bff97d8b2"
2305-
integrity sha512-gtis2/5yLdfI6n0ia0jH7NJs5i/Z/8M/ZbQL6jXQhCthEOe5Cr5NcQPhgTvFxNOtURE03/ZqUcEskdn2M+QaBg==
2306-
2307-
"@fortawesome/free-brands-svg-icons@^5.12.0":
2308-
version "5.13.0"
2309-
resolved "https://npm.fontawesome.com/@fortawesome/free-brands-svg-icons/-/5.13.0/free-brands-svg-icons-5.13.0.tgz#e79de73ba6555055204828dca9c0691e7ce5242b"
2310-
integrity sha512-/6xXiJFCMEQxqxXbL0FPJpwq5Cv6MRrjsbJEmH/t5vOvB4dILDpnY0f7zZSlA8+TG7jwlt12miF/yZpZkykucA==
2311-
dependencies:
2312-
"@fortawesome/fontawesome-common-types" "^0.2.28"
2313-
2314-
"@fortawesome/free-solid-svg-icons@^5.11.2":
2315-
version "5.13.0"
2316-
resolved "https://npm.fontawesome.com/@fortawesome/free-solid-svg-icons/-/5.13.0/free-solid-svg-icons-5.13.0.tgz#44d9118668ad96b4fd5c9434a43efc5903525739"
2317-
integrity sha512-IHUgDJdomv6YtG4p3zl1B5wWf9ffinHIvebqQOmV3U+3SLw4fC+LUCCgwfETkbTtjy5/Qws2VoVf6z/ETQpFpg==
2318-
dependencies:
2319-
"@fortawesome/fontawesome-common-types" "^0.2.28"
2320-
23212302
"@gulp-sourcemaps/[email protected]":
23222303
version "1.0.0"
23232304
resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"

0 commit comments

Comments
 (0)