bones-cli 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
- package/page-template/page.js.tmpl +13 -0
package/index.js
CHANGED
|
@@ -78,7 +78,7 @@ var bfinit = function() {
|
|
|
78
78
|
fs.writeFileSync(dest, updatedContent);
|
|
79
79
|
|
|
80
80
|
src = 'page-template/page.js.tmpl';
|
|
81
|
-
dest = 'pages/page-home/page-home-route.js';
|
|
81
|
+
dest = 'pages/page-home/client/page-home-route.js';
|
|
82
82
|
var templateContent = fs.readFileSync(`${__dirname}/${src}`);
|
|
83
83
|
var updatedContent = templateContent.toString().replace(/TEMPLATE_NAME_GOES_HERE/g, 'pageHome');
|
|
84
84
|
updatedContent = updatedContent.replace(/PAGE_PATH_GOES_HERE/g, '/');
|
|
@@ -105,7 +105,7 @@ var bfinit = function() {
|
|
|
105
105
|
fs.writeFileSync(dest, updatedContent);
|
|
106
106
|
|
|
107
107
|
src = 'page-template/page.js.tmpl';
|
|
108
|
-
dest = 'pages/page-2/page-2-route.js';
|
|
108
|
+
dest = 'pages/page-2/client/page-2-route.js';
|
|
109
109
|
var templateContent = fs.readFileSync(`${__dirname}/${src}`);
|
|
110
110
|
var updatedContent = templateContent.toString().replace(/TEMPLATE_NAME_GOES_HERE/g, 'page2');
|
|
111
111
|
updatedContent = updatedContent.replace(/PAGE_PATH_GOES_HERE/g, '/page/2');
|
|
@@ -232,7 +232,7 @@ var bfpage = function() {
|
|
|
232
232
|
fs.writeFileSync(dest, updatedContent);
|
|
233
233
|
|
|
234
234
|
src = 'page-template/page.js.tmpl';
|
|
235
|
-
dest = `pages/${fileName}/${fileName}.js`;
|
|
235
|
+
dest = `pages/${fileName}/client/${fileName}-route.js`;
|
|
236
236
|
var templateContent = fs.readFileSync(`${__dirname}/${src}`);
|
|
237
237
|
var updatedContent = templateContent.toString().replace(/TEMPLATE_NAME_GOES_HERE/g, componentName);
|
|
238
238
|
updatedContent = updatedContent.replace(/PAGE_PATH_GOES_HERE/g, pagePath);
|
package/package.json
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
+
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
|
1
2
|
|
|
3
|
+
// DISABLE QUERY STRING COMPATIBILITY
|
|
4
|
+
// WITH OLDER FlowRouter AND Meteor RELEASES
|
|
5
|
+
FlowRouter.decodeQueryParamsOnce = true;
|
|
6
|
+
|
|
7
|
+
FlowRouter.route('PAGE_PATH_GOES_HERE', {
|
|
8
|
+
name: 'TEMPLATE_NAME_GOES_HERE',
|
|
9
|
+
action() {
|
|
10
|
+
// Render a template using Blaze
|
|
11
|
+
this.render('layout', 'TEMPLATE_NAME_GOES_HERE');
|
|
12
|
+
console.log('TEMPLATE_NAME_GOES_HERE template rendered.');
|
|
13
|
+
}
|
|
14
|
+
});
|