Code Monkey home page Code Monkey logo

jsenv-brunch's People

Contributors

kenleytomlin avatar pose avatar rcs avatar shiwano avatar steveluscher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jsenv-brunch's Issues

[Question] How do I make use of the variables in module.exports?

In the example you offer with API_URL, I want to do something very similar.

So I expect I can reference this variable in my js files? When I use require('config') which your documentation seems to suggest I can't access anything, have I misunderstood how this is supposed to be use?

jsenv-brunch Permissions Errors

I couldn't finish npm install because of jsenv-brunch throwing Permissions Errors. After installing jsenv-brunch and than running npm install it works.

Error: EPERM: operation not permitted, rename '<pathtoapp>\node_modules\.jsenv-brunch.DELETE\node_modules\coffee-script' -> '<pathtoapp>\node_modules\jsenv-brunch\node_modules\coffee-script'

Allow casting and type definitions

If you want to load an integer or a boolean from an environment variable you will quickly find that you have a lot of values that look like "3" or "true". It would currently be possible to write some helper functions in your jsenv file and then call those on each variable but it seems like this may be a common task (it is for my team at least) and could possibly be made easier.

A backwards compatible solution could be something like this:
config.jsenv

{
  "API_HOST": "http://my.host",
  "__ints__": {
    "API_VERSION": 3
  },
  "__bools__": {
    "API_ENABLED": true
  }
}

when run with API_ENABLED=no brunch build would compile to:

exports.module = {
  "API_HOST": "https://dev.apihost.com",
  "API_VERSION": 3,
  "API_ENABLED": false
}

I'm in no way married to this approach if someone has a better suggestion. If this is something you think others may be interested in I'm happy to throw a pull request up.

Failing to install

I'm getting this error on npm i jsenv-brunch

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "i" "[email protected]"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! path /Users/fifigyuri/Projects/environet3x/ui/node_modules/jsenv-brunch
npm ERR! code ENOTEMPTY
npm ERR! errno -66
npm ERR! syscall rename

npm ERR! ENOTEMPTY: directory not empty, rename '/Users/fifigyuri/Projects/environet3x/ui/node_modules/jsenv-brunch' -> '/Users/fifigyuri/Projects/environet3x/ui/node_modules/.jsenv-brunch.DELETE'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fifigyuri/Projects/environet3x/ui/npm-debug.log

The same happens on npm i [email protected] or npm i git+https://github.com/rcs/jsenv-brunch.git.

I'm using node v6.5.0 and npm v3.10.3. Thanks for help.

License?

Great package. Can you add a license?

preinstall infinite loop

when I run npm install jsenv-brunch I get stuck in an infinite loop that just prints

[email protected] preinstall /Users/DIR_PATH/node_modules/jsenv-brunch
npm install --production --ignore-scripts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.