UNPKG

518 BJavaScriptView Raw
1#!/usr/bin/env node
2
3/**
4 * Compile to browser source
5 */
6
7'use strict'
8
9process.chdir(`${__dirname}/..`)
10
11const {runTasks} = require('ape-tasking')
12const aglob = require('aglob')
13const filecopy = require('filecopy')
14const ababel = require('ababel')
15
16runTasks('shim', [
17 () => ababel('**/*.js', {
18 cwd: 'lib',
19 out: 'shim/node'
20 }),
21 async () => {
22 for (let filename of await aglob('asset/hbs/*.hbs')) {
23 await filecopy(filename, `shim/${filename}`, {
24 mkdirp: true
25 })
26 }
27 }
28], true)