diff --git a/package.json b/package.json index e0f6f246..96ad1cd9 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,8 @@ ] }, "scripts": { + "postinstall": "yarn test && yarn build:dev && yarn theme:dev && lerna link", + "build:dev": "yarn workspace @chakra-ui/vue run rollup --config rollup.dev.config.js", "build": "yarn workspace @chakra-ui/vue build", "dev": "yarn workspace @chakra-ui/vue dev", "lint": "vue-cli-service lint", @@ -33,7 +35,7 @@ "bootstrap": "lerna bootstrap --use-workspaces", "deploy-storybook": "storybook-to-ghpages -- --out=.out", "now-build-storybook": "build-storybook -o dist/storybook", - "docs:dev": "yarn theme:dev && yarn docs-dev", + "docs:dev": "yarn docs-dev", "theme:dev": "yarn workspace @chakra-ui/theme-vue build", "docs-dev": "yarn workspace chakra-ui-docs dev", "evalbundle": "bundlesize" @@ -110,7 +112,7 @@ "mixpanel-browser": "^2.36.0", "node-fetch": "^2.6.0", "node-sass": "^4.13.1", - "nuxt": "^2.0.0", + "nuxt": "^2.12.2", "portal-vue": "^2.1.6", "prismjs": "^1.19.0", "register-service-worker": "^1.6.2", diff --git a/packages/chakra-ui-docs/docs/contributors.vue b/packages/chakra-ui-docs/docs/contributors.vue deleted file mode 100644 index d3b038cf..00000000 --- a/packages/chakra-ui-docs/docs/contributors.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - diff --git a/packages/chakra-ui-docs/nuxt.config.js b/packages/chakra-ui-docs/nuxt.config.js index fdb9c75b..400c174d 100644 --- a/packages/chakra-ui-docs/nuxt.config.js +++ b/packages/chakra-ui-docs/nuxt.config.js @@ -1,11 +1,4 @@ import dotenv from 'dotenv-defaults' -import { stringToUrl } from './utils' -import pages from './utils/all-routes' - -const routes = pages - .map(page => { - return page === 'Index' ? stringToUrl('') : stringToUrl(page) - }) // Configuring dotenv variables. dotenv.config({ @@ -15,10 +8,10 @@ dotenv.config({ export default { mode: 'universal', - srcDir: __dirname, - generate: { - routes + options: { + target: 'static' }, + srcDir: __dirname, head: { title: 'Chakra UI Vue | Simple, Modular and Accessible UI Components for your Vue Applications.', meta: [ @@ -48,12 +41,12 @@ export default { '@nuxtjs/eslint-module' ], modules: [ - ['@nuxtjs/emotion', { - ssr: 'critical' - }], - '@nuxtjs/pwa', - '@nuxtjs/router' + '@nuxtjs/emotion', + '@nuxtjs/pwa' ], + router: { + prefetchLinks: true + }, pwa: { meta: { name: 'Chakra UI Vue', @@ -66,20 +59,20 @@ export default { iconFileName: 'chakra.png' } }, + extensions: [ + 'mdx' + ], build: { transpile: [ 'vue-lorem-ipsum', + '@chakra-ui/vue', '@chakra-ui/theme-vue' ], + additionalExtensions: [ + '.mdx' + ], extend (config, ctx) { config.resolve.alias.vue = 'vue/dist/vue.common' - config.module.rules.push({ - test: /\.mdx$/, - use: [ - 'babel-loader', - 'mdx-vue-loader' - ] - }) } } } diff --git a/packages/chakra-ui-docs/package.json b/packages/chakra-ui-docs/package.json index 2240b1f0..2b676aef 100644 --- a/packages/chakra-ui-docs/package.json +++ b/packages/chakra-ui-docs/package.json @@ -6,6 +6,8 @@ "scripts": { "dev": "nuxt", "build": "nuxt generate --max_old_space_size=8000", + "build-static":"nuxt build --target static", + "export": "nuxt export", "start": "nuxt start --max_old_space_size=8000", "docs:build": "nuxt ", "lint": "eslint --ext .js,.vue --ignore-path .gitignore ." @@ -43,7 +45,7 @@ "mdx-vue-loader": "^1.0.2", "mixpanel-browser": "^2.36.0", "node-sass": "^4.13.1", - "nuxt": "^2.0.0", + "nuxt": "^2.12.2", "prismjs": "^1.19.0", "sass-loader": "^8.0.2", "vue": "^2.6.11", diff --git a/packages/chakra-ui-docs/docs/accessibility.mdx b/packages/chakra-ui-docs/pages/accessibility.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/accessibility.mdx rename to packages/chakra-ui-docs/pages/accessibility.mdx diff --git a/packages/chakra-ui-docs/docs/accordion.mdx b/packages/chakra-ui-docs/pages/accordion.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/accordion.mdx rename to packages/chakra-ui-docs/pages/accordion.mdx diff --git a/packages/chakra-ui-docs/docs/alert.mdx b/packages/chakra-ui-docs/pages/alert.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/alert.mdx rename to packages/chakra-ui-docs/pages/alert.mdx diff --git a/packages/chakra-ui-docs/docs/alertdialog.mdx b/packages/chakra-ui-docs/pages/alertdialog.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/alertdialog.mdx rename to packages/chakra-ui-docs/pages/alertdialog.mdx diff --git a/packages/chakra-ui-docs/docs/aspectratiobox.mdx b/packages/chakra-ui-docs/pages/aspectratiobox.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/aspectratiobox.mdx rename to packages/chakra-ui-docs/pages/aspectratiobox.mdx diff --git a/packages/chakra-ui-docs/docs/avatar.mdx b/packages/chakra-ui-docs/pages/avatar.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/avatar.mdx rename to packages/chakra-ui-docs/pages/avatar.mdx diff --git a/packages/chakra-ui-docs/docs/badge.mdx b/packages/chakra-ui-docs/pages/badge.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/badge.mdx rename to packages/chakra-ui-docs/pages/badge.mdx diff --git a/packages/chakra-ui-docs/docs/box.mdx b/packages/chakra-ui-docs/pages/box.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/box.mdx rename to packages/chakra-ui-docs/pages/box.mdx diff --git a/packages/chakra-ui-docs/docs/breadcrumb.mdx b/packages/chakra-ui-docs/pages/breadcrumb.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/breadcrumb.mdx rename to packages/chakra-ui-docs/pages/breadcrumb.mdx diff --git a/packages/chakra-ui-docs/docs/button.mdx b/packages/chakra-ui-docs/pages/button.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/button.mdx rename to packages/chakra-ui-docs/pages/button.mdx diff --git a/packages/chakra-ui-docs/docs/checkbox.mdx b/packages/chakra-ui-docs/pages/checkbox.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/checkbox.mdx rename to packages/chakra-ui-docs/pages/checkbox.mdx diff --git a/packages/chakra-ui-docs/docs/circularprogress.mdx b/packages/chakra-ui-docs/pages/circularprogress.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/circularprogress.mdx rename to packages/chakra-ui-docs/pages/circularprogress.mdx diff --git a/packages/chakra-ui-docs/docs/closebutton.mdx b/packages/chakra-ui-docs/pages/closebutton.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/closebutton.mdx rename to packages/chakra-ui-docs/pages/closebutton.mdx diff --git a/packages/chakra-ui-docs/docs/code.mdx b/packages/chakra-ui-docs/pages/code.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/code.mdx rename to packages/chakra-ui-docs/pages/code.mdx diff --git a/packages/chakra-ui-docs/docs/collapse.mdx b/packages/chakra-ui-docs/pages/collapse.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/collapse.mdx rename to packages/chakra-ui-docs/pages/collapse.mdx diff --git a/packages/chakra-ui-docs/docs/color-mode.mdx b/packages/chakra-ui-docs/pages/color-mode.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/color-mode.mdx rename to packages/chakra-ui-docs/pages/color-mode.mdx diff --git a/packages/chakra-ui-docs/docs/constraint-based-design.mdx b/packages/chakra-ui-docs/pages/constraint-based-design.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/constraint-based-design.mdx rename to packages/chakra-ui-docs/pages/constraint-based-design.mdx diff --git a/packages/chakra-ui-docs/docs/contributing.mdx b/packages/chakra-ui-docs/pages/contributing.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/contributing.mdx rename to packages/chakra-ui-docs/pages/contributing.mdx diff --git a/packages/chakra-ui-docs/pages/contributors.vue b/packages/chakra-ui-docs/pages/contributors.vue new file mode 100644 index 00000000..a72dd056 --- /dev/null +++ b/packages/chakra-ui-docs/pages/contributors.vue @@ -0,0 +1,95 @@ + + + diff --git a/packages/chakra-ui-docs/docs/controlbox.mdx b/packages/chakra-ui-docs/pages/controlbox.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/controlbox.mdx rename to packages/chakra-ui-docs/pages/controlbox.mdx diff --git a/packages/chakra-ui-docs/docs/divider.mdx b/packages/chakra-ui-docs/pages/divider.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/divider.mdx rename to packages/chakra-ui-docs/pages/divider.mdx diff --git a/packages/chakra-ui-docs/docs/drawer.mdx b/packages/chakra-ui-docs/pages/drawer.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/drawer.mdx rename to packages/chakra-ui-docs/pages/drawer.mdx diff --git a/packages/chakra-ui-docs/docs/editable.mdx b/packages/chakra-ui-docs/pages/editable.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/editable.mdx rename to packages/chakra-ui-docs/pages/editable.mdx diff --git a/packages/chakra-ui-docs/docs/extending-theme.mdx b/packages/chakra-ui-docs/pages/extending-theme.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/extending-theme.mdx rename to packages/chakra-ui-docs/pages/extending-theme.mdx diff --git a/packages/chakra-ui-docs/docs/flex.mdx b/packages/chakra-ui-docs/pages/flex.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/flex.mdx rename to packages/chakra-ui-docs/pages/flex.mdx diff --git a/packages/chakra-ui-docs/docs/formcontrol.mdx b/packages/chakra-ui-docs/pages/formcontrol.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/formcontrol.mdx rename to packages/chakra-ui-docs/pages/formcontrol.mdx diff --git a/packages/chakra-ui-docs/docs/getting-started.mdx b/packages/chakra-ui-docs/pages/getting-started.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/getting-started.mdx rename to packages/chakra-ui-docs/pages/getting-started.mdx diff --git a/packages/chakra-ui-docs/docs/grid.mdx b/packages/chakra-ui-docs/pages/grid.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/grid.mdx rename to packages/chakra-ui-docs/pages/grid.mdx diff --git a/packages/chakra-ui-docs/docs/heading.mdx b/packages/chakra-ui-docs/pages/heading.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/heading.mdx rename to packages/chakra-ui-docs/pages/heading.mdx diff --git a/packages/chakra-ui-docs/docs/icon.mdx b/packages/chakra-ui-docs/pages/icon.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/icon.mdx rename to packages/chakra-ui-docs/pages/icon.mdx diff --git a/packages/chakra-ui-docs/docs/iconbutton.mdx b/packages/chakra-ui-docs/pages/iconbutton.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/iconbutton.mdx rename to packages/chakra-ui-docs/pages/iconbutton.mdx diff --git a/packages/chakra-ui-docs/docs/image.mdx b/packages/chakra-ui-docs/pages/image.mdx similarity index 100% rename from packages/chakra-ui-docs/docs/image.mdx rename to packages/chakra-ui-docs/pages/image.mdx diff --git a/packages/chakra-ui-docs/docs/index.vue b/packages/chakra-ui-docs/pages/index.vue similarity index 76% rename from packages/chakra-ui-docs/docs/index.vue rename to packages/chakra-ui-docs/pages/index.vue index 2eadfe07..c8bfa764 100644 --- a/packages/chakra-ui-docs/docs/index.vue +++ b/packages/chakra-ui-docs/pages/index.vue @@ -1,5 +1,5 @@