-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from ddimitrioglo/dev
#WB v1.1.0 relase
- Loading branch information
Showing
21 changed files
with
197 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.container { | ||
ul { | ||
padding-left: 5px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
$primary-color: green; | ||
@import './styles/variables'; | ||
|
||
.jumbotron { | ||
margin: 40px 20px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
$primary-color: blue; | ||
@import './styles/variables'; | ||
|
||
.jumbotron { | ||
margin: 40px 20px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$primary-color: blue; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "web-boost-skeleton", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"start": "node node_modules/web-boost/bin/run.js", | ||
"compile": "node node_modules/web-boost/bin/compile.js" | ||
}, | ||
"devDependencies": { | ||
"web-boost": "^1.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# Frequently asked questions | ||
|
||
To be updated... | ||
* **How do I get the route name from the template?** | ||
|
||
Yes, there is a build-in variable `routeName`, so you can use it in your templates `{{ routeName }}` | ||
|
||
* **Is @import supported in .scss/.sass files?** | ||
|
||
Yes, just provide a path related to "app.assets" directory. Ex: `@import './styles/variables';` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
'use strict'; | ||
|
||
const Twig = require('twig'); | ||
const logger = require('../src/logger'); | ||
|
||
/** | ||
* Twig configuration | ||
*/ | ||
Twig.extendFunction('asset', (asset) => { | ||
return asset.replace(/^@/, '/'); | ||
try { | ||
return asset.replace(/^@/, '/'); | ||
} catch (error) { | ||
logger.error(`'asset()' syntax error: ${error.message}`); | ||
} | ||
}); | ||
|
||
module.exports = Twig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
'use strict'; | ||
|
||
class Logger { | ||
/** | ||
* @param message | ||
*/ | ||
static log(message) { | ||
Logger._log(Logger.LOG, message); | ||
} | ||
|
||
/** | ||
* @param message | ||
*/ | ||
static info(message) { | ||
Logger._log(Logger.INFO, message); | ||
} | ||
|
||
/** | ||
* @param {String} message | ||
*/ | ||
static error(message) { | ||
Logger._log(Logger.ERROR, message); | ||
} | ||
|
||
/** | ||
* @param {String} type | ||
* @param {String} message | ||
* @private | ||
*/ | ||
static _log(type, message) { | ||
const time = `[${(new Date()).toISOString()}]`; | ||
|
||
switch (type) { | ||
case Logger.LOG: | ||
console.log('✅', time, message); | ||
break; | ||
case Logger.INFO: | ||
console.log('💡', time, message); | ||
break; | ||
case Logger.ERROR: | ||
console.log('❌', time, message); | ||
break; | ||
} | ||
} | ||
|
||
/** | ||
* @returns {String} | ||
* @constructor | ||
*/ | ||
static get LOG() { | ||
return 'log'; | ||
} | ||
|
||
/** | ||
* @returns {String} | ||
* @constructor | ||
*/ | ||
static get INFO() { | ||
return 'info'; | ||
} | ||
|
||
/** | ||
* @returns {String} | ||
* @constructor | ||
*/ | ||
static get ERROR() { | ||
return 'error'; | ||
} | ||
} | ||
|
||
module.exports = Logger; |
Oops, something went wrong.