babel-preset-weaver
v6.2.0
Published
Holistic JavaScript Conventions & Practices
Downloads
51
Readme
Table of Contents
Installing Weaver
Installing Weaver requires Node.js v6+, and either Yarn or npm.
Yarn Installation
Run the following command inside your project directory. Substitute PACKAGE with the name of the package you wish to install.
yarn add --dev @epiloque/PACKAGE
For example, if you wanted to build your project using weaver-build
:
yarn add --dev @epiloque/weaver-build
npm Installation
Run the following command inside your project directory. Substitute PACKAGE with the name of the package you wish to install.
npm install --save-dev @epiloque/PACKAGE
For example, if you wanted to build your project using weaver-build
:
npm install --save-dev @epiloque/weaver-build
Packages
weaver-build
JavaScript library builder for Node.js & browser.
weaver-build --mode=[build|release] --browser --node --production
build
mode creates a commonjs and es6 bundlesrelease
mode creates a umd bundle
weaver-test
JavaScript library testing for Node.js & browser. weaver-test
invokes a set
of tests included in your project.
weaver-test [--browser|--node] [--watch|--production]
- Runs browser tests in
test/*.spec.js
&test/browser/*.spec.js
- Runs nodejs tests in
test/*.spec.js
&test/node/*.spec.js
- Given
SAUCE_USERNAME
&SAUCE_ACCESS_KEY
environment variables will run the unit tests on Sauce Labs' browser cloud - By default runs the unit tests in Firefox and Xvfb virtual framebuffer
weaver-pack
Simplified webpack configuration for building Vue.js applications.
weaver-pack
is a command-line tool that wraps Webpack in order to support
building Vue.js applications based on shared configuration presets. You
can use weaver-pack
within your project, preferably using scripts defined in
your project’s package.json.
weaver-pack [--serve|--build] --production
Project layout
.
├── lib // Webpack compilation output
│ ├── node
│ └── web
└── src
├── components // Vue.js components
├── fonts
├── icons
├── images
├── store // vuex store
├── styles // sass stylesheets
├── index.js // Vue.js application
├── index-node.js // Node.js entry
├── index-web.js // web entry
└── router.js // Vue.js router configuration
Configuration
weaver-pack
uses .weaver.yml
file in the root of your repository to learn
about your project and how you want your builds to be executed.
title: Untitled
lang: en
browserlist:
- last 2 versions
- safari >= 7
meta:
- property: 'description'
content: 'lorem ipsum dolor sit amet'
entries:
- name: index
modules:
- 'index-{{ target }}.js'
- name: vendor
modules:
- vue
- vuex
- vue-router
weaver-readme
Process README.md
through remark
$ weaver-readme README.md
- Generate a Table of Contents
- Auto-link references like in GitHub issues, PRs, and comments
- Fix common typography issues
weaver-changelog
Generate a changelog from git metadata
$ weaver-changelog CHANGELOG.md
Commit Message Conventions
<type>: <subject>
Each commit message type should be one of
new
/feat
/add
for new featureschange
/breaking
for changes in existing functionalitydeprecate
for features removed in upcoming releasesremove
for deprecated features removed in this release.fix
for any bug fixes.sec
/security
to invite users to upgrade in case of vulnerabilitiesperformance
/perf
for performance changes in existing functionalitytest
/tests
for unit and end-to-end tests
License
weaver is released under the terms of the BSD-3-Clause license.