Comparing version 6.0.8--beta to 6.0.9--beta
{ | ||
"name": "elm-spa", | ||
"version": "6.0.8--beta", | ||
"version": "6.0.9--beta", | ||
"description": "single page apps made easy", | ||
@@ -5,0 +5,0 @@ "bin": "dist/src/index.js", |
@@ -32,2 +32,4 @@ "use strict"; | ||
const pages_1 = __importDefault(require("../templates/pages")); | ||
const page_1 = __importDefault(require("../templates/page")); | ||
const request_1 = __importDefault(require("../templates/request")); | ||
const model_1 = __importDefault(require("../templates/model")); | ||
@@ -109,3 +111,6 @@ const msg_1 = __importDefault(require("../templates/msg")); | ||
...paramFiles, | ||
{ filepath: ['Page'], contents: page_1.default() }, | ||
{ filepath: ['Request'], contents: request_1.default() }, | ||
{ filepath: ['Gen', 'Route'], contents: routes_1.default(segments, utils_1.options(kindForPage)) }, | ||
{ filepath: ['Gen', 'Route'], contents: routes_1.default(segments, utils_1.options(kindForPage)) }, | ||
{ filepath: ['Gen', 'Pages'], contents: pages_1.default(segments, utils_1.options(kindForPage)) }, | ||
@@ -112,0 +117,0 @@ { filepath: ['Gen', 'Model'], contents: model_1.default(segments, utils_1.options(kindForPage)) }, |
@@ -41,2 +41,3 @@ "use strict"; | ||
defaults: [ | ||
['Auth.elm'], | ||
['Effect.elm'], | ||
@@ -46,4 +47,2 @@ ['Main.elm'], | ||
[`Pages`, `${reserved.notFound}.elm`], | ||
['Page.elm'], | ||
['Request.elm'], | ||
['View.elm'] | ||
@@ -50,0 +49,0 @@ ] |
@@ -216,4 +216,12 @@ "use strict"; | ||
}; | ||
// Used in place of sophisticated AST parsing | ||
const exposes = (keyword) => (elmSourceCode) => new RegExp(`module\\s(\\S)+\\sexposing(\\s)+\\([^\\)]*${keyword}[^\\)]*\\)`, 'm').test(elmSourceCode); | ||
const exposes = (value) => (str) => { | ||
const regex = new RegExp('^module\\s+[^\\s]+\\s+exposing\\s+\\(([^)]+)\\)'); | ||
const match = (str.match(regex) || [])[1]; | ||
if (match) { | ||
return match.split(',').filter(a => a).map(a => a.trim()).includes(value); | ||
} | ||
else { | ||
return false; | ||
} | ||
}; | ||
exports.exposesModel = exposes('Model'); | ||
@@ -220,0 +228,0 @@ exports.exposesMsg = exposes('Msg'); |
{ | ||
"name": "elm-spa", | ||
"version": "6.0.8--beta", | ||
"version": "6.0.9--beta", | ||
"description": "single page apps made easy", | ||
@@ -5,0 +5,0 @@ "bin": "dist/src/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71138
42
1252