Skip to content

Commit

Permalink
feat(build): expose build via av build
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSharpieOne committed Jun 21, 2017
1 parent 6b8e1b4 commit d6ac419
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 22 deletions.
29 changes: 16 additions & 13 deletions packages/availity-angular-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "availity-angular-kit",
"private": true,
"version": "2.3.0",
"private": true,
"description": "Example Angular project using availity-workflow",
"main": "index.js",
"scripts": {
Expand All @@ -13,8 +13,11 @@
"about": "av about",
"lint": "av lint",
"help": "av help",
"build": "av release",
"profile": "av profile",
"build": "av build",
"build:production": "cross-env NODE_ENV=production av build",
"build:staging": "cross-env NODE_ENV=staging av build",
"release": "av release",
"production": "cross-env NODE_ENV=production av release",
"staging": "cross-env NODE_ENV=staging av release"
},
Expand All @@ -33,17 +36,6 @@
"url": "https://github.com/availity/availity-workflow/issues"
},
"homepage": "https://github.com/availity/availity-workflow#readme",
"devDependencies": {
"availity-workflow": "^2.3.0",
"availity-workflow-angular": "^2.3.0",
"babel-eslint": "^7.2.2",
"cross-env": "^4.0.0",
"eslint": "^3.19.0",
"eslint-config-availity": "^2.1.0"
},
"availityWorkflow": {
"plugin": "availity-workflow-angular"
},
"dependencies": {
"@uirouter/angularjs": "^1.0.4",
"angular": "^1.6.4",
Expand All @@ -64,5 +56,16 @@
"select2": "^3.5.2-browserify",
"tracekit": "^0.4.4",
"velocity-animate": "^1.5.0"
},
"devDependencies": {
"availity-workflow": "^2.3.0",
"availity-workflow-angular": "^2.3.0",
"babel-eslint": "^7.2.2",
"cross-env": "^4.0.0",
"eslint": "^3.19.0",
"eslint-config-availity": "^2.1.0"
},
"availityWorkflow": {
"plugin": "availity-workflow-angular"
}
}
12 changes: 8 additions & 4 deletions packages/availity-react-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
"start": "av start",
"av": "av",
"test": "av test",
"test:debug": "av test --watch",
"test:integration": "cross-env CI=true av test",
"test:watch": "av test --watch",
"test:integration": "av test --integration",
"about": "av about",
"lint": "av lint",
"help": "av help",
"profile": "av profile",
"build": "av release",
"build": "av build",
"build:production": "cross-env NODE_ENV=production av build",
"build:staging": "cross-env NODE_ENV=staging av build",
"release": "av release",
"production": "cross-env NODE_ENV=production av release",
"staging": "cross-env NODE_ENV=staging av release"
},
Expand All @@ -24,7 +27,8 @@
},
"keywords": [
"react",
"availity"
"availity",
"workflow"
],
"author": "Robert McGuinness",
"license": "MIT",
Expand Down
4 changes: 4 additions & 0 deletions packages/availity-workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Lint project files using EsLint.
##### `--include`
Include additional glob patterns for linting.

### `build`
- Cleans up `/dist` folder
- Bundles project assets into the `/dist` folder

### `release`
- Prompts the user for a version
- Cleans up `/dist` folder
Expand Down
5 changes: 4 additions & 1 deletion packages/availity-workflow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const start = require('./scripts/start');
const test = require('./scripts/test');
const lint = require('./scripts/lint');
const about = require('./scripts/about');
const build = require('./scripts/build');
const release = require('./scripts/release');
const profile = require('./scripts/profile');

Expand Down Expand Up @@ -46,7 +47,9 @@ yargs

.command('profile', `${chalk.dim('Analyze Webpack bundles and find what is contributing their sizes')}`, () => { profile() })

.command('release', `${chalk.dim('Bundle project for distribution (production or stagingå)')}`, () => { release() })
.command('build', `${chalk.dim('Bundle project for distribution (production or stagingå)')}`, () => { build() })

.command('release', `${chalk.dim('Bundle project for distribution (production or stagingå) and create a git tag')}`, () => { release() })

.command('about', `${chalk.dim('About availity-workflow')}`, () => { about() })

Expand Down
6 changes: 6 additions & 0 deletions packages/availity-workflow/scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const Promise = require('bluebird');
const del = require('del');
const webpack = require('webpack');
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
const ora = require('ora');
const chalk = require('chalk');
const settings = require('availity-workflow-settings');
const Logger = require('availity-workflow-logger');
const sizeTree = require('webpack-bundle-size-analyzer/build/src/size_tree');
const argv = require('yargs').argv;
Expand All @@ -13,6 +15,10 @@ function bundle(config) {

return new Promise( (resolve, reject) => {

if (!settings.isDryRun()) {
del.sync([settings.output()]);
}

// Check arguement or CLI arg or default to false
const shouldProfile = (config && config.profile) || argv.profile || false;

Expand Down
4 changes: 0 additions & 4 deletions packages/availity-workflow/scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const build = require('./build');

function release() {

if (!settings.isDryRun()) {
del.sync([settings.output()]);
}

return version.prompt()
.then(() =>{
Logger.info('Started releasing');
Expand Down

0 comments on commit d6ac419

Please sign in to comment.