kazzkiq / CodeFlask

A micro code-editor for awesome web pages.
https://kazzkiq.github.io/CodeFlask/
MIT License
1.07k stars 120 forks source link

How do I build codeflask from source? #115

Closed pflagerd closed 4 years ago

pflagerd commented 4 years ago

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 commented 4 years ago

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
  2. 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 commented 4 years ago

Thank-you. You are very understanding and patient.

I am new to Node.js.

I am grateful for your kindness.

Daniel

On Sun, May 17, 2020 at 5:36 PM Claudio Holanda notifications@github.com wrote:

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}.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kazzkiq/CodeFlask/issues/115#issuecomment-629887775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4DSMQJCMKV5KXIOVSYGTRSB7HNANCNFSM4NDQVU2Q .