2nd/later scaffold run results in: scaffold.css already exists
See original GitHub issueENVIRONMENT
0.1.0
OBSERVATION
I ran yarn rw g scaffold NAME
for my first model, worked fine.
I ran yarn rw g scaffold NAME
for my second model, failed after writing 3 out of 15 files:
$ yarn rw g scaffold workspace
yarn run v1.21.1
$ /Users/chris/proj/aw-hammer/node_modules/.bin/rw g scaffold workspace
❯ Generating scaffold files...
✔ Writing `./api/src/graphql/workspaces.sdl.js`...
✔ Writing `./api/src/services/workspaces/workspaces.test.js`...
✔ Writing `./api/src/services/workspaces/workspaces.js`...
✖ Writing `./web/src/scaffold.css`...
→ /Users/chris/proj/aw-hammer/web/src/scaffold.css already exists.
Writing `./web/src/layouts/WorkspacesLayout/WorkspacesLayout.js`...
Writing `./web/src/pages/EditWorkspacePage/EditWorkspacePage.js`...
Writing `./web/src/pages/WorkspacePage/WorkspacePage.js`...
Writing `./web/src/pages/WorkspacesPage/WorkspacesPage.js`...
Writing `./web/src/pages/NewWorkspacePage/NewWorkspacePage.js`...
Writing `./web/src/components/EditWorkspaceCell/EditWorkspaceCell.js`...
Writing `./web/src/components/Workspace/Workspace.js`...
Writing `./web/src/components/WorkspaceCell/WorkspaceCell.js`...
Writing `./web/src/components/WorkspaceForm/WorkspaceForm.js`...
Writing `./web/src/components/Workspaces/Workspaces.js`...
Writing `./web/src/components/WorkspacesCell/WorkspacesCell.js`...
Writing `./web/src/components/NewWorkspace/NewWorkspace.js`...
Adding scaffold routes...
Adding scaffold asset imports...
/Users/chris/proj/aw-hammer/web/src/scaffold.css already exists.
The files listed before the “X” line were generated; those after were not.
It’s fine that generate scaffold
would create the default version of scaffold.css
if one doesn’t exist. If one does exist, the process should continue without treating that as an error.
The process should skip over an existing file, since it may have been created by a prior run and left alone (= same file), or the user has altered it (= would not appreciate having it overwritten).
WORKAROUND
Temporarily – move or delete the file before each generate.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Rails scaffolds scss reset each time a scaffold is generated
Each time I do a rails generate scaffold Name , the app/assets/stylesheets/scaffolds.css.scss file is overwritten (well I get prompted to overwrite it).
Read more >Getting Started with Scaffold: A Primer for Viewer Users
As this guide is primarily intended for users who will run Scaffold in viewer mode only, when prompted for a key by Scaffold,...
Read more >Generating view scaffolding code for existing models
I've been thinking for a while that a generator that creates view scaffolding for an existing model or models would be really useful....
Read more >Technion_HS_2015_final_2014hs.txt - iGEM
I've been part of the high school iGEM team for two years now and find the science behind it fascinating. In school, I...
Read more >Vattel PDF - Scribd
The reproduction of the lithograph having given better results than that of the picture, ... Struck by the lack of har mony that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@weaversam8 that’s 100% the problem. Sorry, I didn’t realise you’re on Windows.
Yeah that should just skip scaffold.css if it already exists, sorry about that. You can add a
--force
flag on your generate command and it will just overwrite it.