Socket
Book a DemoInstallSign in
Socket

@nauto/web-apps-archetype-dev

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nauto/web-apps-archetype-dev

Builder archetype for Nauto's frontend applications (Development)

0.4.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
5
Weekly downloads
 
Created
Source

Web Apps Archetype

This package contains the builder archetype for Nauto's web applications.

Scripts

The following scripts are provided by the archetype and are meant to provide sensible defaults for development workflows on our web applications. They leverage a project's local tsconfig.json and tslint.json to determine which files are relevant for a particular script.

ENV variables

We're using webpack to inject some global variables to be used by both your application and by your build tooling:

  • process.env.NODE_ENV
    • Is set to 'production' when using NODE_ENV=production, and 'development' otherwise.
  • process.env.APP_ENV
    • Is set to the value of NODE_ENV
    • e.g. in NODE_ENV=staging ne builder build, process.env.APP_ENV will be 'staging', and process.env.NODE_ENV will be 'development'

start

Runs a webpack dev server with hot module reloading.

build

Runs webpack with the --optimize-minimize flag and the archetypal webpack configuration. Outputs to the dist/ folder. In order to build for a particular environment, you'll need to set NODE_ENV appropriately:

NODE_ENV=production ne builder run build

server

Runs an express server serving static files from dist/; typically used with the build script to serve its output.

lint

Runs tslint against the files specified in your local tsconfig.json

test

Runs jest with the archetypal configuration.

Examples

The following examples can be run from within a project using builder and this archetype:

# list all available scripts
ne builder

# run an archetypal script
# (behavior can be overridden with a local script of the same name)
ne builder run <script-name>

Publishing the archetype to NPM

This is currently a manual process that will some day be automated:

# in projects/archetyp:
# bump versions of archetype
npm --no-git-tag-version version <version-type>

# sync with dev archetype
npm run builder:gen-dev

# commit
git commit

# tag
git tag @nauto/web-apps-archetype@<version-number>

# publish archetype
npm publish

# publish dev archetype
(cd dev && npm publish)

# push tags and code
git push && git push --tags

If that all succeeds, you should be able to start using your changes right away:

# in your app folder
yarn add @nauto/web-apps-archetype{,-dev}

Technology

  • Node 8
  • Yarn
  • Typescript 2.7
  • Webpack 3
  • React 16
  • React-Router 4
  • Redux
  • Styled-components
  • Jest
  • Cypress

FAQs

Package last updated on 28 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.