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

Implement complete tesselinclude detect spec #638

Closed
rwaldron opened this issue Apr 7, 2016 · 0 comments
Closed

Implement complete tesselinclude detect spec #638

rwaldron opened this issue Apr 7, 2016 · 0 comments

Comments

@rwaldron
Copy link
Contributor

rwaldron commented Apr 7, 2016

  1. Update t2 init to auto-create a .tesselinclude file, that contains the following:
# This file should list any files or directories you want included with the 
# T2 bundling and deployment process. This is handy for including 
# non-JavaScript assets, like HTML, CSS, and images, for use within your project.
# .tesselinclude works the same as .npminclude 
# You DO NOT need to list node_modules or package.json
# For more information, visit: https://tessel.io/docs/cli#usage
  1. Update t2 run and t2 push operations:
    1. Read the entry point file's directory (which is globRoot, not './' *) as list
      1. If list does not include .tesselinclude, do the following:
        1. If list.length is 3 and list includes node_modules, list includes [opts.resolvedEntryPoint] and list includes package.json, do nothing
        2. Else,
          1. If list.length is > 3,
            1. Let assets be an empty array
            2. Foreach entry in list, if [opts.resolveEntryPoint, 'node_modules', 'package.json'].includes(entry) === false, push entry into assets
            3. To the console, print: "The following items were found in your project:"
            4. list.forEach(entry => console.log(\${entry})
            5. To the console, print: "If you need to deploy them to your tessel, you must create a .tesselinclude file that contains the items you wish to deploy with your application."

This spec should be sufficient to meet the requirements and only costs a single readdirSync.

* The current patch assumes that t2 run ... or t2 push ... is always called from the project directory, which is an invalid assumption.

rwaldron added a commit to rwaldron/t2-cli that referenced this issue Apr 7, 2016
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
rwaldron added a commit to rwaldron/t2-cli that referenced this issue Apr 7, 2016
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
rwaldron added a commit to rwaldron/t2-cli that referenced this issue Apr 8, 2016
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
rwaldron added a commit to rwaldron/t2-cli that referenced this issue Apr 8, 2016
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
tikurahul pushed a commit to tikurahul/t2-cli that referenced this issue Apr 10, 2016
…ssel#639)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant