Skip to content

Instantly share code, notes, and snippets.

@agrublev
Created March 4, 2019 04:26
Show Gist options
  • Save agrublev/02a88f247716905d4106bcade5c919b9 to your computer and use it in GitHub Desktop.
Save agrublev/02a88f247716905d4106bcade5c919b9 to your computer and use it in GitHub Desktop.

Startz Scripts

Start running in development mode

start:w:u

Run tasks start:web and start:utils in parallel.

start:web

Start web with parcel

NODE_ENV=development lerna --scope=web run start --stream --

start:utils

NODE_ENV=development lerna --scope=utils run start --stream --

Build Scripts

Build our app

build

Build our main app

Run task build:demo after this

# note that you can directly call binaries inside node_modules/.bin
# just like how `npm scripts` works
babel src -d lib

build:demo

You can use JavaScript to write to task script too!

const webpack = require('webpack')

// Async task should return a Promise
module.exports = () =>
  new Promise((resolve, reject) => {
    const compiler = webpack(require('./webpack.config'))
    compiler.run((err, stats) => {
      if (err) return reject(err)
      console.log(stats.toString('minimal'))
      resolve()
    })
  })

build:bd

Test console. Curs cool

asd

console.log("BDDDDDDD");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment