Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Add vue preset #457

Closed
wants to merge 43 commits into from
Closed

Add vue preset #457

wants to merge 43 commits into from

Conversation

helfi92
Copy link
Member

@helfi92 helfi92 commented Nov 19, 2017

No description provided.

@helfi92 helfi92 self-assigned this Nov 19, 2017
@helfi92
Copy link
Member Author

helfi92 commented Nov 19, 2017

The first commit is the original code of the exported preset. I will send patches to this pull-request.

@helfi92 helfi92 changed the title Add untouched barraponto vue preset. Add vue preset Nov 20, 2017
eliperelman and others added 7 commits November 20, 2017 14:43
…trinojs#452)

* Scaffold new projects with a CLI helper (neutrinojs#376)

* Scaffold new projects with a CLI helper

* Implement requested changes

* Change initial syntax command to be `create-neutrino-project <directory>`
* Remove vorpal in favor of yargs
* Look at `process.env.npm_config_user_agent` to see if user is using yarn
* Remove author&description from questions. Do (yarn|npm) init instead
* Take most recent version of package instead of hardcoding it
* Use javascript-stringify instead of JSON.stringify
* Nits

* Add success message

* Round 2 changes

* Round 3 + Add neutrino lint --fix

* Put all methods inside the Generator class

* Change one instance of let to const

* Nits addressed

* Switch template string to normal string

* Scaffold a new project documentation (neutrinojs#416)

* Scaffold a new project docs

* Add requested changes

* Use more compact markdown tables

Use more compact tables to stay consistent with
the reset of the docs.

* Better terminal output when using the scaffolding app (neutrinojs#448)

* Add Preact to the scaffolding app (neutrinojs#447)

* Add Vue to the scaffolding app (neutrinojs#450)

* Add Vue to the scaffolding app

* Add blank line and change indentation to 2 spaces

* Make create CLI fall in line with scoped package names

* Add ascii logo banner to create-cli, make speech more friendly
* Easier browser targeting via options.browsers

* Pass targets instead of browsers, to both web and node

* Update docs

* Update docs for node, web

* Fix presetEnv reference in docs.
* Add official airbnb preset

* Add eslintrc to validation
If you wish to copy files to the build directory that are not imported from application code, you can place
them in a directory within `src` called `static`. All files in this directory will be copied from `src/static`
to `build/static`. To change this behavior, specify your own patterns with
[@neutrinojs/copy](../../packages/copy/README.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an absolute URL when in the package README.

Copy link
Member

@eliperelman eliperelman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove the yarn.lock file in the package dir.

// Override options for babel-preset-env
presets: [
['babel-preset-env', {
// Passing in targets to babel-preset-env will replace them
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been moved to options.targets. See the web preset for updated docs.

"license": "GPL-3.0",
"peerDependencies": {
"neutrino": "^7.0.0",
"vue": "^2.5.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the vue peerDependency. If we need it during development testing, we can discuss.

"vue": "^2.5.0"
},
"devDependencies": {
"eslint": "^4.9.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these devDependencies for?


if (lintRule) {
// ensure conditions is an array of original values plus our own regex
const conditions = arrify(lintRule.get('test')).concat([LOADER_EXTENSIONS]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of this, we go back and update all our regexes to include vue (and maybe ts as well):

test(/\.(js,jsx,vue,ts)$/)

We could also introduce another API option: extensions.

neutrino.options.extensions = new Set([
  'js',
  'jsx'
  'vue'
  'ts',
  'mjs'
]);

Then we could iterate valid extensions in other places. Thoughts?


if (neutrino.config.plugins.has('stylelint')) {
neutrino.config.plugin('stylelint')
.tap(args => [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it ignores all other arguments. If there aren't any, we can be explicit about extending the first arg using destructuring, otherwise we could spread the rest of the args:

.tap(([options, ...args]) => [
  merge(options, { ... }),
  ...args
]);

.loader(require.resolve('vue-loader'))
.options(options);

if (compileRule && compileRule.uses.has('babel')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about what this does. These isn't a compile loader here until neutrino.use(web, options).

"description": "Neutrino preset adding Vue.js support.",
"main": "src/index.js",
"author": "Capi Etheriel <barraponto@gmail.com> (https://barraponto.blog.br)",
"license": "GPL-3.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order for us to use the code as-is from the original repo, we need to re-license this new version as MPL-2.0. @barraponto do we have your permission for that?

eliperelman and others added 17 commits November 20, 2017 22:13
…ork middleware (neutrinojs#425)

* Support building multiple configurations from a single project with fork middleware

* Add fork middleware documentation

* Have eslintrc consume neutrinorc middleware
…no-dev (neutrinojs#432)

* Initial commit

* Create README.md

* Update README.md

* Updating README

* Switch to react preset for base instead of node

* Swapping storybook-ui for simpler custom solution

* v1.0.0 prep

* Feature: optimizing bundles

* v1.1.0

* v1.1.1 - removing babel-polyfill

* Switching to fast-async, removing regenerator

* Adding missing fast-async

* Fixing switching stories

* v1.2.2

* Upgrading to neutrino v6

* Fixing react classes with HMR, upgrading deps

* hints 'error' instead of true

* 2.1.1

* 2.1.2

* Unmerged commit

* 2.1.3

* Upgrading to Neutrino v7

* 3.0.0

* Initial implementation of importing react-components preset to neutrino-dev
* Set name defaults for file/url-loader

* Fix option short circuit
…utrinojs#455)

* Add official preact preset to packages (neutrinojs#454)

* Update preact preset to fall in line with scoped packages

* Convert preact preset to latest Neutrino API

* Automatically import createElement from react to match preact behavior

* Update docs for preact preset to more closely follow react+web targets
* Conditionally include loaders, preset

* Use options.html

* Type juggle options.devServer.proxy instead of options.devServerProxy

* Set defaults based on options.html

* Add Manifest

* Clean output always

* Code style

* html-loader is unrelated to html generation, include it.

* Use `/` for publicPath

* Simplify publicPath

* Resolve devServer.publicPath to a root relative url

* Keep previous default

* Use single `html` option

* Only clean on build

* fix(deps): update dependency ramda to ^0.25.0 (neutrinojs#405)

* fix(deps): update dependency file-loader to v^1.0.0 (neutrinojs#397)

* Ignore gitbook-plugin-github from automatic renovate (neutrinojs#444)
@helfi92
Copy link
Member Author

helfi92 commented Nov 22, 2017

Closing. Will continue in #484.

@helfi92 helfi92 closed this Nov 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants