Giter Site home page Giter Site logo

marcscheib / aurelia-environment Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 187 KB

aurelia-environment provides simple .env parsing and loading

License: MIT License

JavaScript 100.00%
aurelia aurelia-environment env environment environment-variables jspm plugin

aurelia-environment's People

Contributors

marcscheib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

toonevdb

aurelia-environment's Issues

doesn't work with latest skeleton (esnext-webpack)

the latest esnext-webpack navigation skeleton breaks when I follow your Usage instructions

error:

WARNING in ./src/main.js
Module build failed: SyntaxError: Unexpected token (31:8)

  29 |      // aurelia.use.plugin('aurelia-html-import-template-loader')
  30 |
> 31 |      await aurelia.start();
     |            ^
  32 |      aurelia.setRoot('app');

using your instructions

// adding environment plugin
import {load} from 'aurelia-environment';

export async function configure(aurelia) {
    load().then(() => {

        aurelia.use
            .standardConfiguration()
            .developmentLogging();

        // Uncomment the line below to enable animation.
        // aurelia.use.plugin('aurelia-animator-css');
        // if the css animator is enabled, add swap-order="after" to all router-view elements

        // Anyone wanting to use HTMLImports to load views, will need to install the following plugin.
        // aurelia.use.plugin('aurelia-html-import-template-loader')

        await aurelia.start();
        aurelia.setRoot('app');

        // if you would like your website to work offline (Service Worker),
        // install and enable the @easy-webpack/config-offline package in webpack.config.js and uncomment the following code:
        /*
        const offline = await System.import('offline-plugin/runtime');
        offline.install();
        */

    });
}

' = ' does not equal '=' as the docs suggest

in your usage doc you imply that the below assignments are all roughly equivalent

but your parser doesn't strip the spaces before and after the '='

TEST1 = value

results in this: 'TEST1 '=' value'
so that window.env.TEST1 will be undefined
while window.env['TEST1 '] will equal not 'value' but ' value'

Assignment

To assign values, the syntax is key = value. However, all of the assignments below are valid:

TEST1 = value
TEST2= VALUE
TEST3 =VALUE
TEST4=VALUE
 TEST5 = VALUE
TEST6  =   VALUE

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.