Skip to content

Commit

Permalink
Merged in develop (pull request #2)
Browse files Browse the repository at this point in the history
Vue 3 Mode (beta/testing)

Approved-by: Reed Remington
  • Loading branch information
Michael Dodge committed Feb 2, 2021
2 parents e01b66a + 8e7f877 commit 7ef3721
Show file tree
Hide file tree
Showing 24 changed files with 1,010 additions and 927 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
extends: [
"airbnb-base",
'airbnb-base',
],
rules: {
// Ignore unresolved imports in template files
Expand All @@ -11,7 +11,7 @@ module.exports = {
ignore: [
'^rollup-plugin*',
'^./components',
'^./<%-componentName%>.vue'
'^./<%-componentName%>.vue',
],
},
],
Expand Down
98 changes: 98 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,104 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.0.0] - 2021-01-07

### Removed
- Removed beta tag

### Changed/Removed
- **BREAKING CHANGE**: Drop support for node 10
- Update cli dependencies
- prompts 2.4.0
- eslint 7.17.0
- eslint-config-airbnb-base 14.2.1
- eslint-plugin-import 2.22.1
- husky 4.3.7
- Update template dependencies
- @babel/core 7.12.10
- @babel/preset-env 7.12.11
- @babel/preset-typescript 7.12.7
- @rollup/plugin-babel 5.2.2
- @rollup/plugin-commonjs 17.0.0
- @rollup/plugin-node-resolve 11.0.1
- @rollup/plugin-replace 2.3.4
- @vue/cli-plugin-babel 4.5.10
- @vue/cli-plugin-typescript 4.5.10
- @vue/cli-service 4.5.10
- @vue/compiler-sfc 3.0.5 (Vue 3)
- cross-env 7.0.3
- **NEW** postcss 8.2.3 (Vue 3, peer of rollup-plugin-postcss 4.0.0)
- rollup 2.36.1
- rollup-plugin-postcss 4.0.0
- rollup-plugin-vue 6.0.0 (Vue 3)
- vue 3.0.5 (Vue 3)

### Known Issues
- Vue 3 tree-shaking is broken
- This is due to a [known bug with @vue/compiler-sfc](https://github.com/vuejs/vue-next/issues/2860), used by rollup-plugin-vue
- Vue 2 is not affected

## [4.0.0-beta.1] - 2020-10-15

### Fixed
- Typescript type declarations don't conflict anymore (Vue 3)
- Fixed tree-shaking issues (Vue 2)
- package.json includes `"sideEffects": false`
- Marked appropriate functions as `/*#__PURE__*/`
- Upstream issues may still exist in [vue-runtime-helpers](https://github.com/znck/vue-runtime-helpers/pull/5), but current testing shows output should still be shakeable

### Changed/Removed
- Update template dependencies
- @babel/core 7.12.0
- @babel/preset-env 7.12.0
- @babel/preset-typescript 7.12.0
- @rollup/plugin-babel 5.2.1
- @vue/cli-plugin-babel 4.5.7
- @vue/cli-plugin-typescript 4.5.7
- @vue/cli-service 4.5.7
- @vue/compiler-sfc 3.0.0 (Vue 3)
- rollup 2.30.0
- rollup-plugin-postcss 3.1.8
- rollup-plugin-terser 7.0.2
- vue 3.0.0 (Vue 3)

## [4.0.0-beta.0] - 2020-09-04

### Added
- **NEW**: Vue 3 support! Select target version of Vue - components compiled for Vue 3 are not compatible with Vue 2

### Changed/Removed
- Update cli dependencies
- chalk 4.1.0
- ejs 3.1.5
- eslint 7.7.0
- eslint-config-airbnb-base 14.2.0
- eslint-plugin-import 2.22.0
- Update templates depending on Vue version selected
- **BREAKING CHANGE**: Remove auto-install logic/output entirely
- Auto-install has become an anti-pattern, since Vue 3 will not allow registering components/libraries globally
- **BREAKING CHANGE**: Non-esm builds now attach named exports as properties of the default export
- Nodejs/browser usage is now registered via `Vue.use(globalVar)` instead of `Vue.use(globalVar.default)`, with named exports still accessed as `globalVar.named1`, `globalVar.named2` etc.
- Update template dependencies
- @babel/core 7.11.0
- @babel/preset-env 7.11.0
- @babel/preset-typescript 7.10.4
- @rollup/plugin-alias 3.1.1
- @rollup/plugin-babel 5.2.0
- @rollup/plugin-commonjs 14.0.0
- **NEW** @rollup/node-resolve 9.0.0
- @rollup/plugin-replace 2.3.3
- @vue/cli-plugin-babel 4.5.4
- @vue/cli-plugin-typescript 4.5.4
- @vue/cli-service 4.5.4
- @vue/compiler-sfc 3.0.0-rc.9 (Vue 3 only)
- rollup 2.26.5
- **NEW** rollup-plugin-postcss 3.1.6 (Vue 3 only)
- rollup-plugin-terser 7.0.0
- rollup-plugin-vue 5.1.9 (Vue 2) / 6.0.0-beta.10 (Vue 3)
- vue 2.6.12 (Vue 2) / 3.0.0-rc.9 (Vue 3)
- vue-template-compiler 2.6.12 (Vue 2 only)

## [3.0.1] - 2020-06-05

### Fixed
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ npm run build

## Details

The vue-sfc-rollup utility scaffolds 8-13 files (depending on whether you choose library mode and/or typescript support) for you to kick of your SFC development. These files include:
The vue-sfc-rollup utility scaffolds the essential files you need to kick of your SFC development. These files include:
- a minimal [rollup](https://rollupjs.org) config
- a corresponding package.json file with build/dev scripts and dependencies
- a minimal babel.config.js and .browserslistrc file for transpiling
- a wrapper used by rollup when packaging your SFC
- two wrappers used by rollup when packaging your SFC
- a sample SFC to kick-start development
- a sample usage file which can be used to load/test your component/library during development
- a sample usage file which can be used to load and test your component/library during development

In library mode, there is also an 'index' which declares the components exposed as part of your library.

When developing typescript-based components/libraries, the following supporting files will also be created:
- A basic typescript declaration file for your component/library
- Two basic typescript shim declaration files common to vue-typescript development
- The basic typescript shim declaration file(s) common to vue-typescript development
- A basic tsconfig.json file

If you wish to integrate this into an existing SFC, please check out [the vue-sfc-rollup source](https://github.com/team-innovation/vue-sfc-rollup). The files generated by this utility are located inside the `templates` directory of the repository. Merge the important bits of those file with your existing code, and you'll be good to go.
Expand All @@ -72,6 +72,7 @@ sfc-init
```
The wizard will then prompt you for the following:

- *select vue version*: Declare whether you are writing a component for Vue 2 or Vue 3
- *select mode*: Declare whether you want to scaffold a single component or a library of components.
- *npm name*: This is how people will find your component/library in npm. Please refer to [the official npm docs](https://docs.npmjs.com/files/package.json#name) for details of what to enter here
- *component name* (Single Component Mode Only): This is the kebab-case version of your SFC component name - what your component's tag would be if you were to use this in an HTML page or another component. Since any kebab-case tag name would also be a safe file name, this will also be the name of the generated files.
Expand All @@ -82,7 +83,7 @@ After prompting you for this information, the wizard then creates copies of the

### Developing your SFC

vue-sfc-rollup is focused on packaging your SFC for distribution via npm. The [Vue CLI](https://cli.vuejs.org/) is excellent for the actual development process of your SFC, and vue-sfc-rollup comes pre-wired to use this process. With v3 of the Vue CLI installed, you can truly develop your SFC with zero configuration just by entering the following commands:
vue-sfc-rollup is focused on packaging your SFC for distribution via npm. The [Vue CLI](https://cli.vuejs.org/) is excellent for the actual development process of your SFC, and vue-sfc-rollup comes pre-wired to use this process. With the Vue CLI installed, you can truly develop your SFC with zero configuration just by entering the following commands:

```bash
# Navigate to library folder
Expand Down Expand Up @@ -110,4 +111,4 @@ npm run build
# Ready to publish!
```

Running the build script results in 3 compiled files in the `dist` directory, one for each of the `main`, `module`, and `unpkg` properties listed in your package.json file. With these files are generated, you're ready to go!
Running the build script results in 3 compiled files in the `dist` directory, one for each of the `main`, `module`, and `unpkg` properties listed in your package.json file. With these files generated, you're ready to go!
Loading

0 comments on commit 7ef3721

Please sign in to comment.