1.0.4 • Published 10 years ago

webui-boilerplate v1.0.4

Weekly downloads
5
License
LGPL-3.0
Repository
github
Last release
10 years ago

WebUI Boilerplate

Installation

Create the following files:

package.json

{
  "scripts": {
	"webui": "webui",
	"install": "webui copy-engine && webui copy-libs"
  },
  "dependencies": {
	"webui-cli": "~1.0.0",
    "webui-boilerplate": "~1.0.1"
  }
}

webui.json

{
    "version": "~1.0.1",
    "directory": "private/webui",
    "publicDir": "public/webui",
    "libDir": "public/lib",
    "libs": []
}

Run command:

npm install

File webui.json

OptionDescriptionTypeRequiredDefault
versionDefault version of Boilerplate which is install when run webui install.string|null0null
directoryLocation where are copied engine files.string1webui
publicDirLocation where are copied public files.string|null0null
libDirLocation where are copied libraries.string|null0null
libsTable of libraries. Used to generate .requirejsrc file.array1[]
packageName of boilerplate package.string1webui-boilerplate

Commands

Copy engine files.

npm run webui -- copy-engine

Copy libraries and build .requirejsrc.

npm run webui -- copy-libs

More informations in cli repo.

Libraries example

package.json

{
  // ..
  "dependencies": {
    // ..
    "select2": "~4.0.0"
  }
}

webui.json

{
    // ..
    "libs": [
      // copy file from node_module/select2/dist/js/select2.full.min.js to lib/select2/select2.js
      ["select2", "select2/dist/js/select2.full.min.js", "select2/select2.js"],
      // copy directory from node_module/select2/dist/js/i18n to lib/select2/i18n
      ["select2-i18n", "select2/dist/js/i18n", "select2/i18n"]
    ]
}
Tab indexDescriptionTypeRequired
0Name of RequireJS module.string1null
1Source file, files separated by comma or directory. fileconcat; fs-extrastring1
2Destination location.string1
3Additional options separated by |. Accepts option uglify to minify dest.string0

How to initialize application

Call the startapp function with certain options e.g demo-init.js.

See the source code demo.

License

This library is under the LGPLv3 license. See the complete license in the file:

LICENSE
1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago