Fixed example script path
This commit is contained in:
parent
471c6add4d
commit
6d9869fb85
|
@ -7,7 +7,7 @@ A javascript library providing server defined loading of assets for a single pag
|
|||
|
||||
npm --save install es5-ff-spa-loader
|
||||
|
||||
Then use the es5-ff-spa-loader.js in header as script resource or inline in body.
|
||||
Then use the dist/es5-ff-spa-loader.min.js script inline in the index.
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -104,7 +104,7 @@ A javascript library providing server defined loading of assets for a single pag
|
|||
* localStorage
|
||||
* none
|
||||
|
||||
More custom types are possible like; (todo: needs testing)
|
||||
More custom schemas are possible like; (todo: needs testing)
|
||||
|
||||
FFSpaLoader.options.cache.meta = null; // use auto -> TODO: currently other cached need meta needs fixing.
|
||||
FFSpaLoader.options.cache.js = false;
|
||||
|
@ -148,6 +148,9 @@ Add unit tests for any new or changed functionality. Lint and test your code.
|
|||
|
||||
## Release History
|
||||
|
||||
### 0.0.3
|
||||
* Fix script path in example
|
||||
|
||||
### 0.0.2
|
||||
* Limited example size
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
var express = require('express');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var minify = require('minify');
|
||||
var fetch = require('fetch');
|
||||
var cors = require('cors');
|
||||
var morgan = require('morgan');
|
||||
|
@ -89,10 +88,8 @@ function renderTemplatePath(viewPath) {
|
|||
}
|
||||
|
||||
function renderIndex() {
|
||||
var inline = '';
|
||||
minify(__dirname+'/../es5-ff-spa-loader.js', {}, function(err, data) {
|
||||
inline = '\n\t\t<script>'+data+'</script>';
|
||||
});
|
||||
var inlineData = fs.readFileSync(__dirname+'/../dist/es5-ff-spa-loader.min.js');
|
||||
var inline = '\n\t\t<script>'+inlineData+'</script>';
|
||||
var inlineNot = '\n\t\t<script src=\"/static/es5-ff-spa-loader.js\"></script>';
|
||||
return function (req, res) {
|
||||
res.render('index', {
|
||||
|
@ -126,7 +123,7 @@ server.use('/static/module/angular', express.static(path.join(__dirname,'n
|
|||
server.use('/static/module/angular-route', express.static(path.join(__dirname,'node_modules/angular-route')));
|
||||
|
||||
server.get('/static/es5-ff-spa-loader.js', function (req,res) {
|
||||
res.write(fs.readFileSync(__dirname+'/../es5-ff-spa-loader.js', 'utf8'));
|
||||
res.write(fs.readFileSync(__dirname+'/../dist/es5-ff-spa-loader.js', 'utf8'));
|
||||
res.end();
|
||||
});
|
||||
server.get('/static/spa-client-resources', function (req,res) {
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
"express": "4.11.x",
|
||||
"fetch": "0.3.x",
|
||||
"jquery": "^2.1.4",
|
||||
"minify": "^2.0.2",
|
||||
"morgan": "^1.6.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "es5-ff-spa-loader",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "Javascript Single Page Application Loader",
|
||||
"main": "es5-ff-spa-loader.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in a new issue