Node.js web server focused on performance and simplicity using the latest technologies
.login-tab .exportTitle {
font-size: 20px;
color: #000;
}
The code above will result into something like this: .NjA-NTk .exportTitle
You can create bundles that contains multiple static resources and require them when needed.
module.exports = {
path: '/route',
assets: [
'style!route-style',
'script!route-script'
],
// ..
};
<style>@import url("{{ assets.get('style!route-style') }}");
While on development all assets will be called following this syntax:
/_/pantheon/_/b={resourceBundle}/{resourceType}/rs={resourceName}
On production, the resource name will be replaced by a string concatenation of the last modification time
of the file with the resource name (string is hashed).
<!-- <div jsaction="evt:method;evt:method.." /> -->
<button jsaction="click:button.alert">
<span>Show alert!</span>
</button>
<input type="text" jsaction="input:input.change">
bind('button.alert', () => alert('Hello world!'));
bind('input.change', (evt) => alert(evt.target.value));
Since all the elements class attributes are minified on production, we didn't have a solid way to reference a desired HTML element so we decided to create the jsname
attr which acts as a reference to the desired HTML element.
<div class="class-name another-class" jsname="my-button"></div>
let div = document.querySelector('[jsname="my-button"]');
NOTE: The value inside jsname
attr is minified so everything that doesn't pass through the build process won't work on production
You can get the latest stable release from the releases page or git clone https://github.com/iiegor/pantheon
.
Once you've downloaded it, you are ready to run $ npm install
/ yarn install
to install all the needed dependencies by the server.
MIT © Iegor Azuaga