marcscheib / aurelia-environment Goto Github PK
View Code? Open in Web Editor NEWaurelia-environment provides simple .env parsing and loading
License: MIT License
aurelia-environment provides simple .env parsing and loading
License: MIT License
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();
*/
});
}
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.