0.3.7 • Published 9 years ago

mbuild v0.3.7

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

mbuild cli

for mui build on hbuild

  • browser-sync
  • include for html file
  • babel (default support ES2005)
  • commonJs module

notice: project in HBuild need base on destDir

Install

npm i mbuild -D

Usage

scripts

// dev
./node_modules/.bin/mbuild

// build
./node_modules/.bin/mbuild build

mbuild.config.js

  • destDir default 'dist'

  • srcDir default 'src'

  • concatGroup {Object} Concatenate files that match minimatch-styled file globs

    concat: {
      'sub.js': ['xx/a.js', 'xx/b.js'],
      'sub.css': ['xx/a.css', 'xx/b.css'],
      'all.html': ['xx/a.html', 'xx/b.html', 'c.html']
    }
  • babel {Object} See the Babel options https://babeljs.io/docs/usage/options/

    babel: {
        enabled: true, // default
        presets: ['es2015'],
        ignore: [
            'js/mui.min.js',
            'js/lib/*.js'
        ]
    },
  • commonJs Bundles CommonJS modules for webview

    commonJs: {
      enabled: true, // default
      external: {
        mui: 'window.mui',
        jquery: 'window.jQuery',
      },
      ignore: [
        'page2/child/sub.js',
        'js/lib/*.js'
      ],
    },

include

See https://github.com/coderhaoxin/gulp-file-include,prefix、suffix has changed

example

// header
<title>{@data.fb@}</title>

// a.html before
{@include('./layout/header.html', {
  "title": "首页",
  "data": {
    "fb": "facebook.com/include"
  }
})@}

// a.html after
<title>facebook.com/include</title>
0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.0

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago