Skip to content

Commit

Permalink
Example component is a package.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Jul 28, 2016
1 parent 63ca60f commit 32f8cb3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
3 changes: 3 additions & 0 deletions examples/skate-component/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build
/example.*
/mkdoc.js
2 changes: 1 addition & 1 deletion examples/skate-component/example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var trucks = require('../../src');
var trucks = require('trucks');

trucks(
require('./options'),
Expand Down
4 changes: 1 addition & 3 deletions examples/skate-component/mkdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ function doc(src, dest, opts, cb) {

// @task build compile the component
function build(cb) {
const exec = require('child_process').exec
, cmd = 'mkdir -p build && node example.js';
exec(cmd, cb);
mk.exec('npm run build', cb);
}

// @task readme build the readme file
Expand Down
28 changes: 28 additions & 0 deletions examples/skate-component/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "trucks-example-skate-component",
"version": "1.0.0",
"description": "Skate compiler transform example",
"author": "muji <noop@xpm.io>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/tmpfs/trucks"
},
"engines": {
"node": ">=4.0"
},
"devDependencies": {
"express": "~4.14.0",
"trucks": "*",
"trucks-transform-bundle": "*",
"trucks-transform-csp": "*",
"trucks-transform-skate": "*",
"trucks-transform-trim": "*"
},
"scripts": {
"clean": "rm -rf build",
"prebuild": "npm run clean && mkdir -p build",
"build": "node example.js",
"prepublish": "npm run build"
}
}

0 comments on commit 32f8cb3

Please sign in to comment.