File tree Expand file tree Collapse file tree 7 files changed +56
-10
lines changed Expand file tree Collapse file tree 7 files changed +56
-10
lines changed Original file line number Diff line number Diff line change 1+ ## 1.7.1 ##
2+
3+ Bugfix:
4+
5+ - Find the real place of ` node-atlas ` module used by CLI or by API.
6+
7+
8+
19## 1.7.0 ##
210
311Enhancement:
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ NA = function () {
137137 this . config = init . config ;
138138 this . afterGeneration = init . afterGeneration ;
139139 this . afterGenerates = init . afterGenerates ;
140+ this . afterNewProject = init . afterNewProject ;
140141 this . afterInitProject = init . afterInitProject ;
141142 this . init = init . init ;
142143 this . run = init . run ;
Original file line number Diff line number Diff line change 66/**
77 * @fileOverview NodeAtlas allows you to create and manage HTML assets or create multilingual websites/webapps easily with Node.js.
88 * @author {@link https://www.lesieur.name/ Bruno Lesieur }
9- * @version 1.7.0
9+ * @version 1.7.1
1010 * @license {@link https://github.com/Haeresis/ResumeAtlas/blob/master/LICENSE/ GNU GENERAL PUBLIC LICENSE Version 2 }
1111 * @module node-atlas
1212 * @requires {@link NA#modules.external:async }
Original file line number Diff line number Diff line change @@ -280,8 +280,8 @@ exports.generateStartingProject = function (fallback) {
280280 traverse . on ( 'complete' , function ( ) {
281281 data . pathName = sourcePath ;
282282 NA . log ( NA . appLabels . initCopy . replace ( / % ( [ \- a - z A - Z 0 - 9 _ ] + ) % / g, function ( regex , matches ) { return data [ matches ] ; } ) ) ;
283- if ( NA . afterInitProject ) {
284- NA . afterInitProject ( ) ;
283+ if ( NA . afterNewProject ) {
284+ NA . afterNewProject ( ) ;
285285 }
286286 } ) ;
287287
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ exports.lineCommandConfiguration = function () {
1616 commander
1717
1818 /* Version of NodeAtlas currently in use with `--version` option. */
19- . version ( "1.7.0 " )
19+ . version ( "1.7.1 " )
2020
2121 /* Automaticly run default browser with `--browse` options. If a param is setted, the param is added to the and of url. */
2222 . option ( NA . appLabels . commander . browse . command , NA . appLabels . commander . browse . description , String )
@@ -63,7 +63,8 @@ exports.lineCommandConfiguration = function () {
6363 * @memberOf NA#
6464 */
6565exports . initGlobalVar = function ( ) {
66- var NA = this ;
66+ var NA = this ,
67+ path = NA . modules . path ;
6768
6869 /**
6970 * Name of file which contains language error messages. The name of file is without extension.
@@ -81,9 +82,9 @@ exports.initGlobalVar = function () {
8182 * @alias serverPhysicalPath
8283 * @type {string }
8384 * @memberOf NA#
84- * @default « The path where `node-atlas.js` is. »
85+ * @default « The path where `node-atlas` module is. »
8586 */
86- NA . serverPhysicalPath = process . argv [ 1 ] ;
87+ NA . serverPhysicalPath = path . join ( __dirname , ".." ) ;
8788
8889 /**
8990 * All internationalize labels from `NA#appLanguage` file.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ exports.config = function (config) {
5757 * // or
5858 * // ...
5959 * }).run({
60- * generates : true
60+ * generate : true
6161 * });
6262 * @return {Object } The NA instance for chained functions.
6363 */
@@ -69,6 +69,31 @@ exports.afterGeneration = function (callback) {
6969 return NA ;
7070} ;
7171
72+ /**
73+ * Set private `NA#afterNewProject`.
74+ * @public
75+ * @function afterInitProject
76+ * @memberOf module:node-atlas~NA#
77+ * @param {function } Instruction to execute after initialization of template project.
78+ * @example require('node-atlas')().afterInitProject(function () {
79+ * // Update all files on a server...
80+ * // or
81+ * // Generate a documentation...
82+ * // or
83+ * // ...
84+ * }).run({
85+ * generate: true
86+ * });
87+ * @return {Object } The NA instance for chained functions.
88+ */
89+ exports . afterInitProject = function ( callback ) {
90+ var NA = this ;
91+
92+ NA . afterNewProject = callback ;
93+
94+ return NA ;
95+ } ;
96+
7297/**
7398 * Initialize a NA instance.
7499 * @public
Original file line number Diff line number Diff line change 11{
22 "name" : " node-atlas" ,
33 "preferGlobal" : true ,
4- "version" : " 1.7.0 " ,
4+ "version" : " 1.7.1 " ,
55 "author" : {
66 "name" : " Bruno Lesieur" ,
777979 " lib/node-modules.js" ,
8080 " lib/web-server.js" ,
8181 " bin/node-atlas.js" ,
82- " templates/*" ,
82+ " templates/hello-world/webconfig.json" ,
83+ " templates/hello-world/variations/common.json" ,
84+ " templates/hello-world/variations/index.json" ,
85+ " templates/hello-world/variations/en-us/common.json" ,
86+ " templates/hello-world/variations/en-us/index.json" ,
87+ " templates/hello-world/templates/error.htm" ,
88+ " templates/hello-world/templates/index.htm" ,
89+ " templates/hello-world/controllers/common.js" ,
90+ " templates/hello-world/controllers/index.js" ,
91+ " templates/hello-world/components/head.htm" ,
92+ " templates/hello-world/components/foot.htm" ,
93+ " templates/hello-world/assets/stylesheets/common.css" ,
8394 " LICENSE" ,
8495 " README.md" ,
8596 " CHANGELOG.md" ,
You can’t perform that action at this time.
0 commit comments