@zalom/plastic 1.0.0-alpha.8 → 1.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/install.rb +25 -0
package/package.json
CHANGED
package/scripts/install.rb
CHANGED
|
@@ -217,6 +217,31 @@ def bootstrap
|
|
|
217
217
|
puts " \u{2705} Store bootstrapped"
|
|
218
218
|
end
|
|
219
219
|
|
|
220
|
+
def bootstrap_project_store(slug)
|
|
221
|
+
project_dir = File.join(PLASTIC_HOME, "projects", slug)
|
|
222
|
+
store_dir = File.join(project_dir, "store")
|
|
223
|
+
|
|
224
|
+
FileUtils.mkdir_p(store_dir)
|
|
225
|
+
|
|
226
|
+
template = File.join(PACKAGE_ROOT, "templates", "project.yml")
|
|
227
|
+
dest = File.join(project_dir, "project.yml")
|
|
228
|
+
write_if_missing(dest, File.read(template)) if File.exist?(template)
|
|
229
|
+
|
|
230
|
+
write_if_missing(File.join(project_dir, "INDEX.md"), <<~MD)
|
|
231
|
+
# Index
|
|
232
|
+
|
|
233
|
+
## Active
|
|
234
|
+
|
|
235
|
+
## Future
|
|
236
|
+
|
|
237
|
+
## Clusters
|
|
238
|
+
|
|
239
|
+
## Abandoned
|
|
240
|
+
|
|
241
|
+
## Completed
|
|
242
|
+
MD
|
|
243
|
+
end
|
|
244
|
+
|
|
220
245
|
# --- Agent adapters ---
|
|
221
246
|
|
|
222
247
|
def install_for_agent(key, force)
|