Skip to content

Commit

Permalink
Renamed templates to have .jst suffix and ordered package.json.jst mo…
Browse files Browse the repository at this point in the history
…dules and Gruntfile.js.jst tasks in parallel
  • Loading branch information
ChrisWren committed Oct 27, 2013
1 parent 61bbca4 commit 992cc6c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions lib/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ function generateProject(siteConfig, themeSourceFolder, callback) {

// Render Gruntfile with site config and with pre-rendered grunt-pages
// config
var gruntfileTemplate = fs.readFileSync(path.resolve(__dirname, '../') + '/templates/_Gruntfile.js', 'utf8');
var gruntfileTemplate = fs.readFileSync(path.resolve(__dirname, '../') + '/templates/Gruntfile.js.jst', 'utf8');

utils.safeWriteFile(siteConfig.siteName + '/Gruntfile.js', _.template(gruntfileTemplate)(siteConfig)
// Replace variable delimiters after rendering Gruntfile to allow variables
Expand Down Expand Up @@ -330,15 +330,15 @@ function generateProject(siteConfig, themeSourceFolder, callback) {
function (step) {

// Generate .gitignore file ignoring the deployCredentialsFile if deploying with S3 or FTP
var gitIgnoreTemplate = fs.readFileSync(path.resolve(__dirname, '../') + '/templates/_.gitignore', 'utf8');
var gitIgnoreTemplate = fs.readFileSync(path.resolve(__dirname, '../') + '/templates/.gitignore.jst', 'utf8');
utils.safeWriteFile(siteConfig.siteName + '/.gitignore', _.template(gitIgnoreTemplate)(siteConfig), step);
},

function (step) {

// Render package.json with dependencies based on what CSS preprocessor is
// being used
var packageJSONTemplate = fs.readFileSync(path.resolve(__dirname, '../') + '/templates/_package.json', 'utf8');
var packageJSONTemplate = fs.readFileSync(path.resolve(__dirname, '../') + '/templates/package.json.jst', 'utf8');

utils.safeWriteFile(siteConfig.siteName + '/package.json', _.template(packageJSONTemplate)(siteConfig), step);
},
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions templates/_package.json → templates/package.json.jst
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "blog",
"name": "cabin-site",
"version": "0.0.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-pages": "<%= gruntPagesVersion %>",
"grunt-contrib-copy": "~0.4.1",<% if (CSSPreprocessorTask === 'compass') { %>
"load-grunt-tasks": "~0.1.0",
"grunt-pages": "<%= gruntPagesVersion %>",<% if (CSSPreprocessorTask === 'compass') { %>
"grunt-contrib-compass": "~0.2.0",
<% } else if (CSSPreprocessorTask === 'less') { %>
"grunt-contrib-less": "~0.5.1",
<% } %>"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-clean": "~0.4.0",
"load-grunt-tasks": "~0.1.0",
<% } %>"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-watch": "~0.4.3",
"grunt-contrib-connect": "~0.5.0",
"grunt-open": "~0.2.0",
"grunt-contrib-watch": "~0.4.3"<% if (deployTask) { %>,<% if (deployTask === 'gh-pages') {%>
"grunt-contrib-clean": "~0.4.0"<% if (deployTask) { %>,<% if (deployTask === 'gh-pages') {%>
"grunt-gh-pages": "~0.8.0"<% } else if (deployTask === 's3') { %>
"grunt-s3": "~0.2.0-alpha.3"<% } else if (deployTask === 'ftpush') { %>
"grunt-ftpush": "~0.3.2"<% } } %>
Expand Down

0 comments on commit 992cc6c

Please sign in to comment.