Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

If no args are passed, read config from atomify field of package.json #13

Closed
wants to merge 1 commit into from

2 participants

@bclinkinbeard

My scripts fields were getting long, so was thinking it would be nice to configure things elsewhere. As you can see, it's not exactly a big change. :)

"atomify": {
  "js": {
    "entry": "example/index.js",
    "w": true,
    "d": true
  },
  "css": "index.css:/example/bundle.css",
  "server": {
    "path": "/example/index.html",
    "open": true
  }
}
@Techwraith
Owner
@bclinkinbeard

The API? It's just pulling the opts from package.json instead of the shell or code.

@bclinkinbeard

Manually merged.

@bclinkinbeard bclinkinbeard deleted the pkg branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +6 −2 bin/atomify.js
View
8 bin/atomify.js
@@ -1,7 +1,9 @@
#!/usr/bin/env node
-var cli = require('../lib/cli')
- , argv = require('subarg')(process.argv.slice(2), {
+var path = require('path')
+ , cli = require('../lib/cli')
+ , args = process.argv.slice(2)
+ , argv = require('subarg')(args, {
alias: {
j: 'js'
, c: 'css'
@@ -13,4 +15,6 @@ var cli = require('../lib/cli')
}
})
+if (!args.length) argv = require(path.join(process.cwd(), 'package.json')).atomify;
+
cli(argv)
Something went wrong with that request. Please try again.