abc-script-loader
[![Build Status](https://travis-ci.org/allwiine/abc-script-manager.svg?branch=develop)](https://travis-ci.org/allwiine/abc-script-manager)
Last updated 5 years ago by glenn.abrahamsen .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install abc-script-loader 
SYNC missed versions from official npm registry.

Build Status

abc-script-manager

CLI tool for managing scripts based on a config

Usage
Define your config in abc-config.json.

npm link
abcsm make

Templates
Standard javascript. use parameters where you want ur config parameters to be used
The name of each function must be used as name in the scripts array in the config if u want to call this function.

Sample (trackme.js):

var trackme = function(trackid) {
	console.log(trackid);	
};

Config
JSON format. In project root.
Named abc-config.json

Sample:

{
	"name": "abctags",
	"basepath": "./www/",
	"backup": "./.backup/",
	"apps": [
		{
			"id": "abcnyheter",
			"scripts": [
				{
					"name": "trackme",
					"template": "./templates/trackme.js",
					"params": [
						"1992"
					]
				},
				{
					"name": "trackmore",
					"template": "./templates/trackmore.js",
					"params": [
						1992"
					]
				}
			]
		}
	]
}

Result
The result is written to the folder you defined as basepath in your config.
And it will be named whatever name you defined in your config, and be a js file.

./www/abctags.js

Current Tags

  • 0.0.2                                ...           latest (5 years ago)

2 Versions

  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (5)
Dependents (3)

Copyright 2014 - 2016 © taobao.org |