Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes mixed space and tab. Includes the project name to the HTML title. #11

Merged
merged 1 commit into from
Sep 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# HTML
[*.html]
indent_style = tab
indent_size = 2

# HTML
[*.js]
indent_style = tab
indent_size = 2
3 changes: 3 additions & 0 deletions generator/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ var generator = {
},
project: function(project, opt) {

templates.indexhtml = templates.indexhtml.replace('{{project-title}}', project);
templates.indexhtmlb = templates.indexhtmlb.replace('{{project-title}}', project);

mkdir(project, function() {
if(opt.bundle) {
createLibraries(project)
Expand Down
20 changes: 10 additions & 10 deletions generator/templates/index-bundle.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>New p5 Project</title>
<title>{{project-title}}</title>

<script src="libraries/p5.js"></script>
<script src="libraries/p5.dom.js"></script>
Expand All @@ -14,13 +14,13 @@

<style>
body {
margin:0;
padding:0;
overflow: hidden;
}
canvas {
margin:auto;
}
margin:0;
padding:0;
overflow: hidden;
}
canvas {
margin:auto;
}
</style>
</head>
<body>
Expand Down
20 changes: 10 additions & 10 deletions generator/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>New p5 Project</title>
<title>{{project-title}}</title>

<script src="../libraries/p5.js"></script>
<script src="../libraries/p5.dom.js"></script>
Expand All @@ -14,13 +14,13 @@

<style>
body {
margin:0;
padding:0;
overflow: hidden;
}
canvas {
margin:auto;
}
margin:0;
padding:0;
overflow: hidden;
}
canvas {
margin:auto;
}
</style>
</head>
<body>
Expand Down