How can I upload a webpack project ot the GitHub - github

I Have a problem with GitHub. When I try to publish a project, built with SCSS and Webpack, Github doesn't connect styles to the page, although on my computer it works properly and there are no errors.
It looks like GitHub doesn't connect any of the stylesheets.
Here is an example.
https://zubnoifey.github.io/webpack-example/
I didn't create a big file, just added a couple of strings to show what I am talking about.
I connected the reset.css to the project, and when I run npm run start on my computer, it looks properly.
But when I push the repository to Github it looks like there are no styles at all. The same with images, they don't load, only the alteration.
Ths is how it looks locally

I got it. If I add to address /build it works
https://zubnoifey.github.io/cloudbudget-with-webpack/build/

Related

How to export static HTML from Svelte without Surge or Vercel?

I want to publish my Svelte web app to GitHub pages and based my application on the template https://github.com/sveltejs/template. When I run npm run build, public/build/bundle.js is created but no index.html. All the tutorials I found talk about how to deploy Sapper projects, or to use external tools like Vercel and Surge, but is it possible to just build Svelte without any external tools? All I want is a static HTML page that I can copy to GitHub pages.
Edit: See the accepted answer for the general approach, however for non-root-directory-deployment, you still need to make the paths relative. I created a pull request at https://github.com/sveltejs/template/pull/239.
In svelte, index.html is a static file which will import your bundle.js and run it.
index.html is located at /public/index.html while your bundle.js is located at /public/build/bundle.js
in svelte template, index.html imports /build/bundle.js using a script tag to initialize the application.
while deploying, you just need to upload the whole /public folder and everything should be operational.

How to create a page extension in Directus 7

I have a working Directus CMS environment and would like to include some custom pages in there as well. According to the documentation!, I "can build page modules for custom dashboards, reporting, point-of-sale systems, or anything else".
The CMS is downloaded from directus, installed in localhost and then moved with FTP to the server as my client doesn't have terminal access allowed.
I already tried the boilerplate from https://github.com/directus/extension-toolkit, created a vue page with it, ran npm to transpile it, but now I don't know where to put it. If I put it to public > extensions > custom > pages (I put here the whole created folder), it's not shown anywhere and I can't really find any tutorial or help on how to do it. Not even in the docs.
You have to copy only the dist subdirectory of the extension to your server.
Example:
directus-extensions create page orders
directus-extensions build
rsync ./dist/ root#example.com:/var/www/directus/public/extensions/custom/pages/orders/
You should now see your page extension listed in the sidebar when you log in to your Directus app (provided your user role is configured to display extensions in the sidebar).

Installation using GitHub

I don't know the first thing about programming, but I came across something I would like to install using GitHub.
These are the steps:
Fork or Clone the repository.
Run npm install while in the directory of the project.
Open chrome and load in a new "unpacked extension" from the extensions screen.
Open project folder and load in the src folder in /chrome.
Open /app/containers/auth.js/sagas.js/ and edit the variable --CHROME_EXTENSION_ID to the one found in your chrome extensions screen.
Run npm start in the root directory of the project.
Navigate to localhost:3000/login and the chrome extension will handle the login process.
I got the "clone the repository" part lol.
Is this something that anyone can easily teach me how to do or does it require some kind of programming knowledge?
I'm sorry for the layman post.
Thanks in advance
Fork or Clone the repository. (this is covered above)
You should start by searching Google for "How do I clone using git". Git is a tool, GitHub is just a cloud service for git. git has help built in.
git help
Typically you would do this assuming you have git installed.
git clone <git repo>
Git questions need to go on SuperUser.com too.
So, it looks like you are trying to install something for NodeJS. Installing NodeJS can sometimes be tricky, but use Google if you get stuck with specific errors.
run npm install while in the directory of the project.
Typically you just need to cd into the folder you just cloned.
Then you just run:
npm install
This installs the libraries (dependencies) that the program you are using needs. Keep an eye out for any warnings.
Open chrome and load in a new "unpacked extension" from the extensions screen.
Open Chrome and paste this URL: chrome://extensions/
Open project folder and load in the src folder in /chrome.
Ideally, you have a text editor like Atom or Sublime Text. You'll want to open the Git folder you 'cloned' earlier. Both are great, Atom is free.
Open /app/containers/auth.js/sagas.js/ and edit the variable --CHROME_EXTENSION_ID to the one found in your chrome extensions screen.
I would need to see the file to help here. If it's Java it might look like this:
var CHROME_EXTENSION_ID = "SOME_ID";
or it could be in JSON format:
{
CHROME_EXTENSION_ID: "SOME_ID"
}
run npm start in the root directory of the project.
So, inside the folder you cloned you run this to start a NodeJS server.
npm start
This typically will start a local server on your computer.
Navigate to localhost:3000/login and the chrome extension will handle the login process.
An id all does well, you would just be able to open this URL in Chrome.
http://localhost:3000/login
If all went well you should be able to point the browser at your computer and see whatever you are expecting.

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/

Appcelerator Titanium Mobile: app.js not found

I created an app with Appcelerator's Titanium Mobile on my home machine. The path was /Users/[myusername]/Projects/ProjectName.
I checked my code into Mercurial.
The next day, at my office computer, I cloned the Mercurial repo, and then added the existing app. I tried to run it in the simulator and received the error:
could not find the file app.js.
I looked at the log and noticed that the path it was looking for was the path on my home computer, not the path on my office computer.
What can I do to make my app run on two different computers? I imagine that if I created a new app and then copied my code into it, it would probably work on the office machine. But if I checked my code in, and got latest at home it would probably be broken there.
Open tiapp.xml
Remove the line. f01a795a-46e7-4627-8558-465e5998c99d
Do a full rebuild
Bring guid tag back (just to make sure you still have it on tiapp.xml)
Do a full rebuild again.
Here's the source:
http://www.limechalk.com/blog/fix-runtime-error-when-running-appcelerator-app-on-android-emulator/
Can you re-create a new project? copy your files tiapp.xml as well as folder Resources to your new project and build again.
This issue mainly caused by JavaScript minification,either you have syntax error in one or more js files or which is hard to predict may you have some other files in you project that are not js files and cause this failure to build and then this common error .
my two cents open up you project files and look carefully for any file or files that are not supposed to be in it.