Coder Social home page Coder Social logo

pink-circle's Introduction

pink-circle

A demo of Parcel with Sass och Typescript. Made for students at vocational university studying front-end on their second semester of four.

How to clone, install and run

  1. First clone repo to local machine
git clone https://github.com/niklas-mardby/pink-circle.git
  1. Enter repo directory
cd pink-circle
  1. Install dev dependencies
npm install
  1. Start the dev server that will watch for saved changes to your SCSS-files and TS-files
npm run start
  1. Now open http://localhost:1234/ in your browser. The dev server is running and you can code Sass and TS, save and then watch the result in your browser without having to compile or refresh.

How to set this up with your own project

If you want to start your own project working with Parcel, Sass and Typescript you set it up like this:

First install Sass and Typescript globally, then

  1. Create repo on Github with a readme
  2. Clone repo to local computer and enter folder of repo
  3. Run
npm init
  1. Run
npm install --save-dev parcel

and make sure your package.json has these lines:

"source": "src/index.html",
"scripts": {
    "start": "parcel"
  },

โญ My package.json currently looks like this: https://github.com/niklas-mardby/pink-circle/blob/main/package.json and yours can look the same.

  1. Create a .gitignore file and add
node_modules
dist
.parcel-cache
  1. Now create the files and folders for your project! Create a folder src and in there create an index.html

  2. You can link your html directly to your Sass and TS like so

<script defer src="ts/app.ts"></script>
<link rel="stylesheet" href="scss/main.scss">
  1. Which also means you need a folder scss with a main.scss and a folder ts with an app.ts (all of which are added to folder src)

  2. Now you are set up and you can start the dev server and start working with watch and auto-refresh

npm run start
  1. Now open http://localhost:1234/ in your browser

Resources

Issues

There are more things that could be added. Come with suggestions!

Known issues are:

  • Readme lacks instructions on how to build project

pink-circle's People

Contributors

niklas-mardby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.