1.8.1 • Published 5 years ago

unitejs-cli v1.8.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

NPM version Build Status Coveralls NPM downloads MIT License

UniteJS CLI - Zero Configuration Web App Creation

How many times have you started a new web project and thought maybe I should try using the latest and greatest tech stack to see what I am missing?

Then the reality check happens and you probably think:

  • I don't have time to learn a new technology
  • The getting started guides are great but I just want to dive in and code
  • I don't want to have to learn all the new tasks/commands/scripts just to give it a try
  • How long is it going to take me to configure the different technologies to work together

The aim of UniteJS is to provide a CLI tool which you can use to create a ready to roll application with code, styling, unit tests and e2e tests, platform packaging, resource generation all with zero configuration. All combinations of the chosen technologies provide the same set of tasks to run and produce the same output.

We try not to be too opinionated with what our CLI produces, but sometimes that can't be helped :wink:

Create your app with any combination of the options below, all guaranteed to work with no additional configuration.

  • Application Frameworks: Angular, Aurelia, Polymer, Preact, React, Vanilla, Vue.
  • Languages: JavaScript, TypeScript
  • Module Types: AMD, CommonJS, SystemJS
  • Bundlers: Browserify, RequireJS, SystemJS, Webpack
  • Linter: ESLint, TSLint
  • Unit Test Runners: Jest, Karma
  • Unit Test Frameworks: Jasmine, Mocha
  • Unit Test Engines: Chrome Headless, JSDOM, PhantomJS
  • E2E Test Runners: Protractor, WebDriverIO
  • E2E Test Frameworks: Jasmine, Mocha
  • CSS Pro Processors: Css, Less, Sass, Stylus
  • CSS Post Processors: PostCss
  • CSS Linter: LessHint, SassLint, Stylint, StyleLint
  • Documenters: ESDoc, JSDoc, TypeDoc
  • Task Runners: Gulp
  • Package Managers: Npm, Yarn
  • Platforms: Cordova, Docker, Electron, Web

As we add new features to UniteJS you will be able to update your project without losing any changes you have made.

Documentation

In depth CLI documentation with examples can be found on our web site at http://unitejs.com/#/cli

Information on the facilities available in the generated app can be found at http://unitejs.com/#/generatedapp

If you don't want to type in all the command line options we have provided an online generator on our web site at http://unitejs.com/#/generator or if you are using VSCode you can install our extension UniteJS VSCode Extension with shortcuts to many of the tasks.

Install

UniteJS is a node module and is best installed as a global package.

npm install -g unitejs-cli / yarn global add unitejs-cli

Usage

unite command --argName<0>=argValue<0> ... --argName<n>=argValue<n>

where command is one of:

  • help
  • version
  • configure
  • buildConfiguration
  • generate
  • clientPackage
  • platform
  • package

Argument names are case sensitive but values are case insensitive, argument values with spaces should be enclosed in quotes, apostrophes or backticks.

Commands

unite help

Displays the help on the command line.


unite version

Displays the version of the app and the engine on the command line.


unite configure

This command will generate your skeleton application with the options you specify.

ArgumentValueUsed For
packageNameplain text, package.json name rules applyName to be used for your package
licenseNone/{See SPDX for options}The license file to generate if required
appFrameworkAngular/Aurelia/Polymer/React/Vanilla/VueThe application framework to use
sourceLanguageJavaScript/TypeScriptThe language you want to code in
linterESLint/TSLint/NoneThe linter
None - means no linting
moduleTypeAMD/CommonJS/SystemJSThe module type you want to use
bundlerBrowserify/RequireJS/SystemJSBuilder/WebpackThe bundler you want to use
unitTestRunnerJest/Karma/NoneThe unit test runner
None - means no unit testing
unitTestFrameworkJasmine/MochaChaiThe unit test framework to use
unitTestEngineJSDom/PhantomJS/ChromeHeadlessThe unit test engine to execute tests
e2eTestRunnerProtractor/WebdriverIO/NoneThe e2e test runner
e2eTestFrameworkJasmine/MochaChaiThe e2e test framework to use
cssPreCss/Less/Sass/StylusThe css preprocessor to use
cssPostPostCss/NoneThe css postprocessor to use
None - means no css post processor
cssLinterLessHint/None/SassLint/Stylint/StyleLintThe css linter to use
None - means no css linter
documenterESDoc/JSDoc/None/TypeDocThe documenter to use
None - means no documenter
idesVSCodeThis can be a comma separated list
optional can be blank
packageManagerNpm/YarnThe package manager to use
optional - defaults to Npm if not already set
profileSee ProfilesThe profile to use
optional - defaults to no profile
forceForce overwrite of all existing configuration
optional - defaults to off
noCreateSourceSkip source file creation if already deleted
optional - defaults to off
outputDirectory'path'The location that you want the project generated
optional - defaults to current directory
Meta DataAll Optional
titleplain textUsed on the web index page
optional - defaults to packageName
descriptionplain textMeta data description
optional - defaults to title
shortNameplain text (usually <= 12 chars)Meta data short name
optional - defaults to title
keywordscomma separated plain textMeta data keywords
optional - defaults to title split on space
organizationplain textMeta data organization
optional - defaults to empty
webSiteurlUrl for web site associated with organization
optional - defaults to empty
copyrightplain textCopyright notice for application
optional - defaults to empty
namespacedotted nameNamespace to use in packaging e.g. org.myorg
optional - defaults to empty
authorplain textName of the app author
optional - defaults to empty
authorEmailemail addressE-mail of the app author
optional - defaults to empty
authorWebSiteurlWeb Site of the app author
optional - defaults to empty

Command buildConfiguration

--operation=add

This will either add a new configuration or update any existing configurations with the same name.

ArgumentValueUsed For
operationadd
configurationNameplain textName of the configuration to modify
bundleShould the final output be bundled
optional - defaults to off
minifyShould the final output be minified
optional - defaults to off
sourcemapsShould the final output include sourcemaps
optional - defaults to on
pwaInclude Progressive Web App functionality
optional - defaults to off
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

--operation=remove

This will remove an existing configuration.

ArgumentValueUsed For
operationremove
configurationNameplain textName of the configuration to modify
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

unite generate

Creates components for use in your application, your application framework, sourceLanguage, css preprocessor and other variables will be used to create code specific to your configuration. Additionally simple unit tests will be created.

ArgumentValueUsed For
namethe name you want to use for your itemThis can have spaces in it and will be
reformatted during generation
typespecific to each applicationFrameworkSee below
subFoldera folder to create your new item inOptional with framework defaults built in
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

Generate Types

  • Angular - class, component, directive, enum, guard, interface, module, pipe, service
  • Aurelia - attribute, binding-behavior, class, component, element, enum, interface, pipeline-step, value-converter
  • Polymer - class, component, enum, interface
  • Preact - class, component, enum, interface
  • React - class, component, enum, interface
  • Vanilla - class, enum, interface
  • Vue - class, component, enum, interface

unite clientPackage

Perform operations to add or remove client packages. In addition these operations will handle the npm/yarn tasks.

operation add

This will add a new clientPackage and modify all the necessary configuration files to include it in your app.

ArgumentValueUsed For
operationadd
packageNameplain textName of the package to add
version1.23.4Fixed version to install
optional - defaults to latest version
preloadShould the package be preloaded at app startup
optional - defaults to not preload
main'path'The path to the main js file in the package
optional - defaults to looking it up
use * to mean all files to be mapped
mainMinified'path'The path to the minified main js file
optional - defaults to using main
mainLibcomma separated globsA specific set of files to include when main=*
optional - defaults to all js in the package
noScriptDon't include any scripts from the package
optional - defaults to false
includeModeapp/test/bothWhen should the package be loaded as a module
optional - defaults to both
scriptIncludeModenone/bundled/notBundled/bothWhen should the package be included as a script
optional - defaults to none
isPackageThis is included as a package in module loaders
optional - defaults to not package
assetscomma separated globsThese files are packed in platform builds
optional - defaults to empty
testingAdditionskey1=value1,key2=value2Additional scripts for testing
optional - defaults to empty
mapkey1=value1,key2=value2Additional module config maps
optional - defaults to empty
loaderskey1=value1,key2=value2Additional module config loaders
optional - defaults to empty
transpileAlias'path'The location to build a transpiled version
optional - defaults to empty
transpileLanguageJavaScript/TypeScriptThe source language to transpile from
optional - defaults to empty
transpileSourcescomma separated globsThe source files to transpile
optional - defaults to empty
transpileModulescomma separated module namesRelative module name imports to replace with map
optional - defaults to empty
transpileStripExtShould we strip extensions from imports
optional - defaults to false
transpileTransformsfrom1,to1,from2,to2...Regex transforms to apply during transpilation
optional - defaults to empty
packageManagernpm/yarnThe package manager to use for the add
optional - defaults to npm if not already set
profileSee ProfilesThe profile to use
optional - defaults to no profile
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

--operation=remove

This will remove an existing clientPackage and modify all the necessary configuration files to remove it from your app.

ArgumentValueUsed For
operationremove
packageNameplain textName of the package to remove
packageManagernpm/yarnThe package manager to use for the remove
optional - defaults to npm if not already set
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

unite platform

Perform operations to add or remove platforms. This provides tasks that allow you to wrap your web application for different platforms.

--operation=add

This will add a new platform and modify all the necessary configuration files to include it in your app.

ArgumentValueUsed For
operationadd
platformNameCordova/Docker/Electron/WebName of the platform to add
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

--operation=remove

This will remove an existing platform and modify all the necessary configuration files to remove it from your app.

ArgumentValueUsed For
operationremove
platformNameCordova/Docker/Electron/WebName of the platform to remove
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

unite package

Add a pre-configured package to your application.

ArgumentValueUsed For
packageNameSee PackagesName of the package to add
outputDirectory'path'Location of the unite.json from configure
optional - defaults to current directory

Configuration Profiles

The following configuration profiles are currently available, they provide a set of defaults recommended by the application framework providers.

  • AngularJavaScript
  • AngularTypeScript
  • AureliaJavaScript
  • AureliaTypeScript
  • PolymerJavaScript
  • PolymerTypeScript
  • PreactJavaScript
  • PreactTypeScript
  • ReactJavaScript
  • ReactTypeScript
  • VanillaJavaScript
  • VanillaTypeScript
  • VueJavaScript
  • VueTypeScript

Client Package Profiles

The following clientPackage profiles are currently available, they provide a set of defaults for the libraries.

  • bluebird
  • bootstrap4
  • font-awesome
  • moment
  • lodash
  • primsjs
  • rxjs
  • underscore

Packages

Packages for use with the UniteJS JavaScript framework management tool.

Each package includes the npm modules and example code for a specific library.

When installed the package will also endeavour to create a router entry to link to the new example page.

  • moment
  • lodash
  • rxjs
  • underscore

See the UniteJS Packages repo for more details.

Disclaimer

UniteJS currently has about 200 dependencies on the libraries it uses to generate the app, while we endeavour to make sure that every combination works it goes without saying that from time to time something will break.

Our web site Status page shows the current state of our test matrix which tries to test as many combinations as possible using the latest version of each library.

If you are still having issues just let us know in the Issues and we will get it fixed ASAP.

Feature Requests

You can see the planned features in the roadmap if there is any other technologies you would like to see added just drop us a message.

1.8.1

5 years ago

1.8.0

6 years ago

1.7.12

6 years ago

1.7.10

6 years ago

1.7.9

6 years ago

1.7.8

6 years ago

1.7.7

6 years ago

1.7.6

6 years ago

1.7.5

6 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.8

6 years ago

1.6.7

6 years ago

1.6.6

6 years ago

1.6.5

6 years ago

1.6.4

6 years ago

1.6.2

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago