Browse Source

scaffolding: change helper description files

Herby Vojčík 4 years ago
parent
commit
cf3f5a9002
2 changed files with 59 additions and 55 deletions
  1. 23 19
      grunt-init-project/root/parts.html
  2. 36 36
      grunt-init-project/root/uninstall.html

+ 23 - 19
grunt-init-project/root/parts.html

@@ -8,27 +8,31 @@
   </head>
 
   <body>
-  <p>The sample app contains three additional parts beyond Amber itself:</p>
+  <p>The sample app contains a few additional parts beyond Amber itself:</p>
   <ul style="width: 40ex">
-      <li>The elements in <code>index.html</code>
-          <code>&lt;body&gt;</code> tag.</li>
-      <li><code>amber-contrib-jquery</code> module,
-          providing jQuery and a wrapper over it.</li>
-      <li><code>amber-contrib-web</code> module,
-          providing <code>Web</code> package
-          that allows for DOM manipulation
-          and is inspired by Seaside.</li>
-      <li><code>domite</code> module,
-          providing Amber-native DOM wrapper.</li>
-      <li><code>silk</code> module,
-          providing <code>Silk</code> package
-          that allows for DOM manipulation,
-          is meant as alternative to <code>Web</code>
-          and is inspired by stream metaphor and mochikit.</li>
+      <li>The common infrastructure: testing.js, devel.js, *.json,
+          .gitignore, big part of Gruntfile.js,
+          <code>devDependencies</code> in package.json
+      </li>
+      <li>Common code ({%= name %}-Tests package).</li>
+      <li>These introductory files: parts.html and uninstall.html</li>
+      <li>Polyfilling: some dependencies in package.json
+          and their use in Gruntfile.js and index.html.
+      </li>
+      <li>The webapp-specific code ({%= name %} package).</li>
+      <li>The webapp-specific dependencies in package.json
+          (modules silk, domite, contrib-web and contrib-jquery).
+      </li>
+      <li>The webapp entry point index.html.</li>
+      <li>The webapp-specific infrastructure: deploy.js
+          and parts of Gruntfile.js that use webapp-specific pieces.
+      </li>
+      <li>The lambda-specific code ({%= name %}-Backend package).</li>
+      <li>The lambda handler file lambda/index.js.</li>
+      <li>The lambda-specific infrastructure: lambda.js
+          and parts of Gruntfile.js that use lambda-specific pieces.
+      </li>
   </ul>
-  <p>Additionally, npm module <code>es6-promise</code>
-  is included and used by default in building / development
-  with help of es6-promise.amd.json manifest file.</p>
   </body>
 
 </html>

+ 36 - 36
grunt-init-project/root/uninstall.html

@@ -8,48 +8,48 @@
   </head>
 
   <body>
-  <p>Once you start developing your own app / lib, you should
+  <p>Once you start developing your own app / lib / backend, you should
       remove all unnecessary parts left from the sample app.</p>
   <ul style="width: 40ex">
-      <li>In <code>index.html</code>
-          <code>&lt;body&gt;</code> tag,
+      <li>You can choose to polyfill less or not at all in Gruntfile.js / index.html,
+          as a consequence polyfilling dependencies can be uninstalled.
+      </li>
+      <li>In case you don't need webapp part at all, you can remove
+          deploy.js (and its appearance in testing.js), {%= name %} package,
+          webapp-specific dependencies in package.json
+          (modules silk, domite, contrib-web and contrib-jquery),
+          remove "start the app" call in index.html
+          and remove webapp-specific parts in Gruntfile.js.
+      </li>
+      <li>You should keep index.html (you need it to develop),
+          but in cleaned form (see below).</li>
+      <li>In index.html <code>&lt;body&gt;</code> tag,
           everything should be removed, except
           the <code>&lt;script&gt;</code> tag
           that initializes Amber and starts your app;
-          then you can add elements specific to your own app
-          to the page.</li>
-      <li>If you aren't going to use <code>Web</code>
-          package from <code>amber-contrib-web</code> module,
-          but want to retain the jQuery wrapper,
-          you should run <code>npm uninstall @ambers/contrib-web --save</code>
-          from your CLI.</li>
-      <li>If you aren't going to use the <code>Web</code>
-          package from the <code>amber-contrib-web</code> module,
-          nor the jQuery wrapper from <code>amber-contrib-jquery</code>,
-          you should run <code>npm uninstall @ambers/contrib-web @ambers/contrib-jquery --save</code>
-          from your CLI.</li>
-      <li>You cannot remove just the jQuery wrapper and retain the Web package,
-          as it depends on the jQuery wrapper.</li>
-      <li>If you aren't going to use <code>Silk</code>
-          package from <code>silk</code> module,
-          but want to retain <code>DOMite</code> DOM wrapper,
-          you should run <code>npm uninstall silk --save</code>
-          from your CLI.</li>
-      <li>If you aren't going to use the <code>Silk</code>
-          package from the <code>silk</code> module,
-          nor the DOM wrapper from <code>domite</code>,
-          you should run <code>npm uninstall silk domite --save</code>
-          from your CLI.</li>
-      <li>You cannot remove just the <code>DOMite</code> DOM wrapper
-          and retain the Silk package, as it depends on <code>domite</code>.</li>
-      <li>Your <code>Gruntfile.js</code> may contain references
-          to <code>Web</code> and/or <code>Silk</code> in <code>libraries</code>
-          field(s). Fix those fields to not contain non-existing libraries (optionally
-          add other needed ones, like <code>domite</code> or <code>Wrappers-JQuery</code>).</li>
+          then you can add elements specific to your own webapp
+          to the page (or leave it bare if case in previous item happened).</li>
+      <li>In case you will develop the webapp part,
+          you will probably only use one set of libraries presented
+          (there are more options so you can see and choose).
+          So either you keep silk which depends on domite,
+          or you keep contrib-web which depends on contrib-jquery.
+          Your Gruntfile.js may contain references
+          to these modules in <code>libraries</code>
+          field(s). Fix those fields to not contain removed libraries.</li>
+      <li>In case you are developing an Amber library (eg. not the app),
+          you'll probably end up not needing any of the aformentioned libraries
+          (depends on how UI-heavy your library are),
+          and you likely can remove the intro {%= name %} class
+          and the "start the app" call in index.html.
+      </li>
+      <li>In case you don't need the lambda / backend part at all,
+          you can remove lambda.js (and its appearance in testing.js),
+          {%= name %}-Backend package, lambda directory
+          and remove lambda-specific parts of Gruntfile.js.
+      </li>
+      <li>These introductory files: parts.html and uninstall.html can be deleted.</li>
   </ul>
-  <p>If you are sure your app will only be run in modern browser / node.js
-      with Promise present, you can <code>npm uninstall es6-promise --save</code>,
-      then remove <code>es6-promise.amd.json</code> file.</p>
   <p>As the last step, make sure the dependency tree is in a correct state
       by recreating it: run <code>npm run reset</code> from your CLI.</p>
   </body>