diff --git a/.gitignore b/.gitignore
index 7637172be..a90660f06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,9 +28,12 @@ nbproject
node_modules
# AMSF specified
-_amsf/themes
-_amsf/core
+.amsf-cache
+.jekyll-metadata
_site
_app/assets/**/js
_app/assets/**/css
-.jekyll-metadata
+
+# AMSF deprecated, leave them for compatibility
+_amsf/themes
+_amsf/core
diff --git a/Gruntfile.coffee b/Gruntfile.coffee
index c689c89c9..878662ba6 100644
--- a/Gruntfile.coffee
+++ b/Gruntfile.coffee
@@ -17,7 +17,7 @@ module.exports = (grunt) ->
config:
cfg: grunt.file.readYAML("_config.yml")
pkg: grunt.file.readJSON("package.json")
- amsf: grunt.file.readYAML("_amsf/_config.yml")
+ amsf: grunt.file.readYAML("_amsf.yml")
deploy: grunt.file.readYAML("_deploy.yml")
app: "<%= config.cfg.source %>"
dist: "<%= config.cfg.destination %>"
@@ -25,7 +25,7 @@ module.exports = (grunt) ->
banner: "\n"
amsf:
- base: "_amsf"
+ base: ".amsf-cache"
branch: grunt.option("branch") or "release"
core: "<%= amsf.base %>/core"
user:
@@ -300,13 +300,13 @@ module.exports = (grunt) ->
serve:
options:
- config: "_config.yml,_amsf/_config.yml,<%= config.app %>/_data/<%= amsf.theme.current %>.yml,_config.dev.yml"
+ config: "_config.yml,_amsf.yml,<%= config.app %>/_data/<%= amsf.theme.current %>.yml,_config.dev.yml"
drafts: true
future: true
dist:
options:
- config: "_config.yml,_amsf/_config.yml,<%= config.app %>/_data/<%= amsf.theme.current %>.yml"
+ config: "_config.yml,_amsf.yml,<%= config.app %>/_data/<%= amsf.theme.current %>.yml"
dest: "<%= config.dist %><%= config.base %>"
shell:
@@ -386,6 +386,19 @@ module.exports = (grunt) ->
}
]
+ amsf__config__to_app:
+ files: [
+ {
+ expand: true
+ dot: true
+ cwd: "<%= amsf.core %>"
+ src: [
+ "_amsf.yml"
+ ]
+ dest: "./"
+ }
+ ]
+
amsf__core__to_app:
files: [
{
@@ -401,6 +414,7 @@ module.exports = (grunt) ->
"Gruntfile*" # Comment this when debugging this task
"LICENSE"
"package.json"
+ "!_amsf.yml"
"!.DS_Store"
"!TODOS.md"
]
@@ -472,12 +486,22 @@ module.exports = (grunt) ->
replace:
amsf__theme__update_config:
- src: ["<%= amsf.base %>/_config.yml"]
- dest: "<%= amsf.base %>/_config.yml"
+ src: ["_amsf.yml"]
+ dest: "_amsf.yml"
replacements: [
{
- from: /(theme:)( +)(.+)/g
- to: "$1$2<%= amsf.theme.new_name %>"
+ from: /(theme: +)(.+)/g
+ to: "$1<%= amsf.theme.new_name %>"
+ }
+ ]
+
+ amsf__core__update_version:
+ src: ["_amsf.yml"]
+ dest: "_amsf.yml"
+ replacements: [
+ {
+ from: /(version: +)(.+)/g
+ to: "$1<%= config.pkg.version %>"
}
]
@@ -538,6 +562,20 @@ module.exports = (grunt) ->
tagMessage: "chore: create tag %VERSION%"
push: false
+ # Custom tasks
+ grunt.registerTask "amsf-func-mkdir", "Initialize AMSF working directory", ->
+ grunt.file.mkdir '.amsf-cache'
+
+ grunt.registerTask "amsf-func-preupdate", "Update ASMF (preprocess)", ->
+ # Check if config exists
+ if !grunt.file.exists('_amsf.yml')
+ grunt.task.run [
+ "copy:amsf__config__to_app"
+ ]
+
+ grunt.registerTask "amsf-func-postupdate", "Update ASMF (postprocess)", ->
+
+ # Defined tasks
grunt.registerTask "theme-upgrade", "Upgrade specific theme from AMSF cache to app", [
"shell:amsf__theme__to_app"
]
@@ -569,13 +607,17 @@ module.exports = (grunt) ->
]
grunt.registerTask "amsf-update", "Update ASMF", [
+ "amsf-func-preupdate"
"clean:amsf__core__remove_repo"
"gitclone:amsf__core__add_remote"
"copy:amsf__core__to_app"
"shell:amsf__core__update_deps"
+ "replace:amsf__core__update_version"
+ "amsf-func-postupdate"
]
grunt.registerTask "init", "Initialize new project", [
+ "amsf-func-mkdir"
"theme-add"
]
diff --git a/_amsf.yml b/_amsf.yml
new file mode 100644
index 000000000..52736ab3b
--- /dev/null
+++ b/_amsf.yml
@@ -0,0 +1,9 @@
+#
+# Almace Scaffolding preferences
+#
+
+# AMSF version
+version: 0.1.8
+
+# Current theme
+theme: curtana
diff --git a/_app/_posts/note/2014-06-09-creating-themes.md b/_app/_posts/note/2014-06-09-creating-themes.md
index bc4dfdaab..f4431364c 100644
--- a/_app/_posts/note/2014-06-09-creating-themes.md
+++ b/_app/_posts/note/2014-06-09-creating-themes.md
@@ -374,6 +374,6 @@ You really like your custom design and wanna show it off to the world? Cool, you
$ grunt theme-save
```
-The activated theme will be saved to AMSF cache (`_amsf/`) with correct file and directory structure, then you can upload your theme to GitHub.
+The activated theme will be saved to AMSF cache (`.amsf-cache/`) with correct file and directory structure, then you can upload your theme to GitHub.
Still confusing? see my default theme [Curtana](http://github.com/amsf/amsf-curtana) for reference.
diff --git a/_app/_posts/note/2014-06-10-themes.md b/_app/_posts/note/2014-06-10-themes.md
index 96a95b63d..3ec99397b 100644
--- a/_app/_posts/note/2014-06-10-themes.md
+++ b/_app/_posts/note/2014-06-10-themes.md
@@ -32,10 +32,10 @@ $ grunt theme-add --theme=bootstrap-sass --user=sparanoid
### Manually Install
-You can also install themes manually. find an AMSF theme (Curtana, for example), download the package and uncompress all files to `_amsf/themes` directory, the file structure should look like:
+You can also install themes manually. find an AMSF theme (Curtana, for example), download the package and uncompress all files to `.amsf-cache/themes` directory, the file structure should look like:
```
-├── _amsf/ (Almace Scaffolding cache directory)
+├── .amsf-cache/ (Almace Scaffolding cache directory)
| ├── themes/
| | └── curtana/
| | | └── assets/
@@ -48,12 +48,11 @@ You can also install themes manually. find an AMSF theme (Curtana, for example),
Then execute the following command:
-
```sh
$ grunt activate --theme=curtana
```
-You current theme will be backed up to `_amsf/themes/your-old-theme/` and the new theme `curtana` will be installed to the appropriate directories.
+You current theme will be backed up to `.amsf-cache/themes/your-old-theme/` and the new theme `curtana` will be installed to the appropriate directories.
## Upgrading Themes
diff --git a/_app/feed-atom.xml b/_app/feed-atom.xml
index 86d8c289e..9eab776c7 100644
--- a/_app/feed-atom.xml
+++ b/_app/feed-atom.xml
@@ -11,7 +11,7 @@ permalink: /feed.xml
{{ site.description }}
{{ site.time | date_to_xmlschema }}
{{ amsf_site_base | xml_escape }}/
- Jekyll feat. Almace Scaffolding
+ Almace Scaffolding
diff --git a/_deploy.yml b/_deploy.yml
index 875561f58..67b28fb6d 100644
--- a/_deploy.yml
+++ b/_deploy.yml
@@ -2,7 +2,6 @@
# Custom deployment variables
#
-
rsync:
user: rsync
port: 22