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

How do I build codeflask from source? #115

Closed
pflagerd opened this issue May 17, 2020 · 2 comments
Closed

How do I build codeflask from source? #115

pflagerd opened this issue May 17, 2020 · 2 comments

Comments

@pflagerd
Copy link

I've cloned. I see rollup.config.js. I see rollup in your credits. I have nodejs installed. I run on OpenSUSE Linux. I installed rollup thus:

npm install rollup --global
/home/oy753c/Downloads/node-v12.16.3-linux-x64/bin/rollup -> /home/oy753c/Downloads/node-v12.16.3-linux-x64/lib/node_modules/rollup/dist/bin/rollup
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/rollup/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

I ran rollup thus:

rollup --config rollup.config.js

I saw a complaint about a missing plugin, which I installed thus:

oy753c@DELL7720:~/Documents/CodeFlask> npm install rollup-plugin-node-resolve
npm WARN deprecated rollup-plugin-node-resolve@3.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
+ rollup-plugin-node-resolve@3.4.0
added 5 packages from 5 contributors and audited 8 packages in 0.654s

1 package is looking for funding
  run `npm fund` for details

By now I've almost lost interest, and have decided to look at some of the other many options, but I decided to ask for your help.

Can you help me?

Daniel

@kazzkiq
Copy link
Owner

kazzkiq commented May 18, 2020

It depends on why exactly do you want to build it from source.

If you just want to use a built version of CodeFlask directly in the browser (without importing it in a project with bundlers like Webpack or Rollup), you can use it directly from a CDN:

https://unpkg.com/codeflask/build/codeflask.min.js

If you want to build it locally, then under your project folder, run:

  1. Dependency install:
npm install
  1. Project build
npm run build

No need to install Rollup globally. The 1st step will already install rollup dependency locally and use it for further commands you run in the project.

In the file rollup.config.js, you will see there is an output object that defines where the build file will be located at. So your built file will be at: build/codeflask.min.js.

I'm not sure if you're familiar with Node.js environments, but in Node.js projects all available tasks are located inside package.json, under scripts object. Think of it as a Makefile. So when in doubt, always take a look at this section to know which commands you can run via npm run {command}.

@pflagerd
Copy link
Author

pflagerd commented May 18, 2020 via email

@kazzkiq kazzkiq closed this as completed May 19, 2020
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

2 participants