clasp
clasp copied to clipboard
File push order seems to be broken
Expected Behavior
clasp push
adheres to file push order defined in .clasp.json.
Actual Behavior
clasp push
results in project files listed in lexicographic order.
Steps to Reproduce the Problem
- Pull contents of a GAS project via
clasp pull
- Edit the generated .clasp.json file with the desired push order.
- Create a new GAS project for testing (to protect the original GAS project from order wrangling).
- Update .clasp.json with script id from new project.
- Push project via
clasp push
. - Open/refresh dupe(formerly blank) GAS project.
Specifications
- Node version 10.15.0:
- Version 2.1.0:
- OS (Mac/Linux/Windows):
Added Context
This is what my project looks like pre-push:
Here's a snippet of the filePushOrder taken from my .clasp.json
file:
BUT... here's what my project looks like post clasp push
:
Decided to try clasp again in order to test out the filePushOrder
feature. Doesn't seem to work as advertised.
@DimuDesigns are you using the latest npm release or building directly from this repository?
@PopGoesTheWza Latest NPM release.
A PR fixing this has been merged, so you can either wait until next release or build your own from this repository
clone this repository locally and run npm uninstall -g @google/clasp && npm run build-fresh
@DimuDesigns can you try with clasp 2.2.0 if the issue still occurs?
I'm using clasp 2.3.0 and I don't think that this issue has been fixed already. I've made an example on StackOverflow. I've listed here all opened issues concerned this problem on Git google/clasp:
@DimuDesigns @kornthing Using the latest npm version of @google/clasp
I do not experience any issue related to the filePushOrder
in .clasp.json
If you still are, please share a github repository with some sample code and .clasp.json
(no need to give access to your Google Apps Script project) so that I may investigate further.
Here is a sample repository I used to check proper usage of filePushOrder
.
A better description in the doc may be useful though and a PR would be appreciated.
@kornthing can you please give a status about this issue?
If anyone is still having issues with this you need to remember to add the path to the file including the rootDir.
For example a build folder such as:
build-
server-
- file1.js
-file2.js
Would need to add 'build/server/' to the file name. { "scriptId":"123456789", "rootDir":"build", "filePushOrder": ["build/server/file2.js", "build/server/file1.js"] }
Strangely enough, removing the rootDir
value from .clasp.json
solved this for me.