raisely / cli Goto Github PK
View Code? Open in Web Editor NEWRaisely CLI for local development
License: Other
Raisely CLI for local development
License: Other
Use CTRL + C to stop
(node:62580) UnhandledPromiseRejectionWarning: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
at Proxy.watch (fs.js:1441:11)
Hey team, I just setup a new repo following the quickstart guides and using 2 worflows to deploy a staging and production environment.
Unfortunately this is the error I am bumping up into
This may be similar to #24 ?
To clarify, there are currently no .scss files in the stylesheet folder. I just ran raisely update
and thats whats there.
NOTE: I am also using github envirnoments to store the secrets for each of the deployments.
Oh our repo is public so you can see it here: https://github.com/bamboocreativenz/livingsober-raisely
Any help would be much appreciated.
I realised that the UUIDs of campaigns may be something I could commit in my repo. While everything else definetly shouldn't be.
The reasoning, it enables me to create multiple github repos targeting different sets of campaigns. AND makes it a lot easier to onboard different devs into differend projects/clients work.
If my repo is public than yes I am exposing the uuid to the internet, which is not ideal. But to be honest I think its ok a malicious third party would still not have the API key or the login credentials.
Alternatively It would be good to set this via a seperate .env so we can share this amongst the developers while expecting each of them to still login with their own account.
Right now, any invalid Sass in styles will dump something like this to stderr:
Saving {campaignName}/_core/global.scss(node:54061) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"status":400,"time":"2020-04-18T01:17:30.510Z","errors":[{"code":"invalid syntax","status":400,"message":"Sass error: \"Invalid CSS after \"}\": expected 1 selector or at-rule, was \".profilelist. .pagi\"\"","detail":"One or more of the values you sent was not of the correct syntax. Please check the format of the values you are sending.","title":"Invalid Syntax"}]}
at new StatusCodeError (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.EventEmitter.emit (domain.js:475:20)
at Request.<anonymous> (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request/request.js:1154:10)
at Request.emit (events.js:210:5)
at Request.EventEmitter.emit (domain.js:475:20)
at IncomingMessage.<anonymous> (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely/cli/node_modules/request/request.js:1076:12)
(node:54061) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:54061) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
โ Saving {campaignName}/_core/global.scss(node:54061) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"status":400,"time":"2020-04-18T01:17:55.817Z","errors":[{"code":"invalid syntax","status":400,"message":"Sass error: \"Invalid CSS after \"}\": expected 1 selector or at-rule, was \".profilelist. .pagi\"\"","detail":"One or more of the values you sent was not of the correct syntax. Please check the format of the values you are sending.","title":"Invalid Syntax"}]}
at new StatusCodeError (/Users/flynn/.nvm/versions/node/v12.13.1/lib/node_modules/@raisely
This should be cleaned up to only show the Sass error for this specific function. Otherwise, all stderr traces should be hidden behind a debug or verbose flag.
I am aware that custom components are deployed org wide, so this is less important for components.
However for deploying scss it would be good if the warning also told you which campaign you are overiting.
Obviously it matters less if you have disabled the ability for users to edit files through the ui, but as we are transitioning our client from ui edits to source controlled edits, thats not the case for us.
It'd be beneficial to add the ability to integrate the cli into a CI workflow to automate the deployment of styles and components without the need to pull down and authenticate via login.
In the documentation it indicates that Raisely will consolidate the style files into one file in alphabetical order.
Organise your CSS
No-one likes a CSS file that's a 1000 lines long. Raisely lets you organise your CSS into folders. You can create new folders and files in your CLI-supported project. Raisely will automatically concatenate them when compiling them, in alphabetical order.
But it does not tell you how to setup the file system to leverage this feature:
In the above screen shot I was trying to use @import
to see if that made a difference. It did not and the CLI said the components had deployed with no errors, but the @import
was not in the remote file. Which would likely indicate it was a silent failure.
UPDATE: Ok I then ran raisely local
and confirmed that there were scss
transpile errors. ie variables in some code snippet I was playing with had not been declared, so the transpilation failed. This would have been a lot better to have seen in the result of the raisely deploy
action. However Even after fixing these the code changes are still not deploying.
The CLI is either buggy or the documentation needs to be updated.
Hey team, now that I understand the system a bit better, namely that components still often need .scss to go along with them as their styling API for components is not as replete as stylesheets. I'd like to make a suggestion for a relatively easy short term improvement.
Have a seperate set of .scss files specifically for components that are loaded into every campaign. ie its an organisation level base style file(s)
AND than make sure that campaign styling is loaded with a default higher specificity than these styles - so it overrides them.
Once you have done this than I would update the api so its much clearer that there are different packages you are deploying. Something like what lerna does. That way its very clear your updating different packages.
Out the box a new raisely account would have 1 components package and 1 campaign package.
Generally language wise I like:
Alternatively you could make components operate at a per campaign level instead.
Anyway, food for thought.
Hi there,
When I run the command raisely deploy
I get the following error:
This seems to happen for me across all campaigns.
The folder structure is exactly how it is created from the CLI when running raisely init
and I have not modified the stylesheets. I am also on windows and using raisely CLI version 1.6.4.
Any help would be much appreciated, thanks.
I've tried several campaigns today and each time I raisely init
and select a campaign it downloads the components fine, but the stylesheets folder is always empty.
Back in the day I found Brad Frosts Atomic Design guidelines super inspirational. Not sure if this is where you are deriving these naming convensions from.
In anycase, it would be great if these were more cleary identifiable through the dev documentation. Maybe jsut adding them as a tag? it would at least be helpful for me. I'd look at the source code, but it doesn't look like that has been open-sourced.
path/win32
)Hi there,
Since the latest fixes the CLI has been working on windows but would often crash. I've been hesitant to create this issue because I can't figure out the exact steps to reproduce consistently, and I can usually just restart the CLI. However, the error is always the same and it happens quite frequently.
It seems to be another path mapping inconsistency.
Hi there,
I am trying to use the raisely local
command so I can modify some code and test it locally before pushing it to our live site.
I have just noticed that whenever I run this command (or visit http://localhost:8015 directly) it will redirect to the domain where the live site is hosted, rather than staying on localhost.
This makes it harder to try and update code on the live site without affecting the users.
Please let me know if there is a workaround for this.
Cheers,
Jack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.