-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
683 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
example |
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,2 +1,69 @@ | ||
# eses | ||
Ejs Scss ES6 template builder | ||
Ejs Scss ES6 template builder, to create html template | ||
|
||
## Installation | ||
`npm i eses --save-dev` | ||
|
||
## Features | ||
- ejs template | ||
- scss styling | ||
- es6 | ||
- autoprefixer | ||
- watch & live reload | ||
- libraries copier | ||
- options to use sass(js) or dart-sass | ||
|
||
## Commands | ||
package.json: | ||
```json | ||
"scripts": { | ||
"dev": "eses --dev", | ||
"build": "eses", | ||
"lib": "eses --lib" | ||
} | ||
``` | ||
|
||
`npm run build`\ | ||
`npm run dev`\ | ||
`npm run lib` | ||
|
||
## Default configuration | ||
eses.config.js: | ||
```javascript | ||
module.exports = { | ||
path: { | ||
html: { | ||
src: 'source/ejs', | ||
dst: 'compiled/html', | ||
}, | ||
css: { | ||
src: 'source/scss', | ||
dst: 'compiled/css', | ||
}, | ||
js: { | ||
src: 'source/js', | ||
dst: 'compiled/js', | ||
} | ||
}, | ||
server: { | ||
host: '127.0.0.1', | ||
port: 3000, | ||
watch: 'compiled', | ||
verbose: false, | ||
}, | ||
useDartSass: false | ||
} | ||
``` | ||
## Example libraries | ||
eses.libraries.js: | ||
```javascript | ||
module.exports = { | ||
dst: 'compiled/lib', | ||
lib: { | ||
'bootstrap': 'node_modules/bootstrap/dist/js/bootstrap.bundle.j*', | ||
'jquery': ['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.slim.js'], | ||
'photoswipe': ['node_modules/photoswipe/dist/*', '!node_modules/photoswipe/dist/*.min.js'], | ||
'photoswipe/default-skin': 'node_modules/photoswipe/dist/default-skin', | ||
} | ||
} | ||
``` |
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,24 @@ | ||
module.exports = { | ||
path: { | ||
html: { | ||
src: 'source/ejs', | ||
dst: 'compiled/html', | ||
}, | ||
css: { | ||
src: 'source/scss', | ||
dst: 'compiled/css', | ||
}, | ||
js: { | ||
src: 'source/js', | ||
dst: 'compiled/js', | ||
}, | ||
}, | ||
server: { | ||
host: '127.0.0.1', | ||
port: 3000, | ||
watch: 'compiled', | ||
verbose: false, | ||
}, | ||
useDartSass: false, | ||
customConfig: 'eses.config.js', | ||
} |
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 @@ | ||
module.exports = { | ||
server: { | ||
port: 8080, | ||
} | ||
} |
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,9 @@ | ||
module.exports = { | ||
dst: 'compiled/lib', | ||
lib: { | ||
'bootstrap': 'node_modules/bootstrap/dist/js/bootstrap.bundle.j*', | ||
'jquery': ['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.slim.js'], | ||
'photoswipe': ['node_modules/photoswipe/dist/*', '!node_modules/photoswipe/dist/*.min.js'], | ||
'photoswipe/default-skin': 'node_modules/photoswipe/dist/default-skin', | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"scripts": { | ||
"dev": "eses --dev", | ||
"build": "eses", | ||
"lib": "eses --lib" | ||
}, | ||
"devDependencies": { | ||
"eses": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"bootstrap": "^4.6.0", | ||
"jquery": "^3.6.0", | ||
"photoswipe": "^4.1.3" | ||
} | ||
} |
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,3 @@ | ||
{ | ||
"title": "Eses" | ||
} |
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 @@ | ||
<link rel="stylesheet" href="../css/main.css"> |
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 @@ | ||
<script src="../js/main.js"></script> |
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,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<%- include('include/_css') %> | ||
<title><%= title %></title> | ||
</head> | ||
<body> | ||
<div class="container py-3"> | ||
<div class="card border-0 shadow-sm"> | ||
<div class="card-body"> | ||
<p>Welcome to <%= title %></p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<%- include('include/_js') %> | ||
</body> | ||
</html> |
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,8 @@ | ||
import { getTransitionDuration } from './modules/_util' | ||
|
||
function init() { | ||
console.log('hello world') | ||
} | ||
init() | ||
|
||
console.log(getTransitionDuration(document.body)) |
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,7 @@ | ||
const getTransitionDuration = element => { | ||
return parseFloat(window.getComputedStyle(element).transitionDuration) * 1000 | ||
} | ||
|
||
export { | ||
getTransitionDuration, | ||
} |
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 @@ | ||
$body-bg: #f1f1f1; |
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,2 @@ | ||
@import "variables"; | ||
@import "../../node_modules/bootstrap/scss/bootstrap"; |
Oops, something went wrong.