π― pudl is a JavaScript-based static site generator (SSG) for quick-prototyping and creating awesome little static demos while teaching/presenting. It significantly cuts down your dev-setup time and improves productivity. It also gives a nice developer experience.
|
|
A FOSS (Free & Open Source Software) automation workflow project. Developed and Maintained by @MaedahBatool. |
- Live reloads browser with BrowserSync.
- CSS: Sass to CSS conversion, error catching, Autoprefixing and CSS minification.
- Watches files for changes in CSS.
- Corrects the line endings.
- InjectCSS instead of browser page reload.
- Sends message notification to you.
- Prevents pipe breaking caused by errors.
STEP #0 β Don't have Node.js
+ npm
installed? Read this small guide. (CLICK TO EXPAND!)
In case you are an absolute beginner to Node.js
, JavaScript, and npm
packages β all you need to do is go to the Node's site download + install Node on your system. This will install both Node.js
and npm
, i.e., node package manager β the command line interface of Node.js.
You can verify a successful installation by opening your terminal app and then start typing...
node -v
# Results into v9.11.2 β please make sure you have Node >= 8 installed.
npm -v
# Results into v6.2.0 β please make sure you have npm >= 5.3 installed.
Download the gulpfile.js
, package.json
, .gitignore
, and config.js
files inside the root folder of your project.
OR use your terminal to browse your desired folder and run the following command that downloads all the required files for you via cURL.
curl -L https://git.io/pudlgfl -o "gulpfile.js" && curl -L https://git.io/pudlpkjs -o "package.json" && curl -L https://git.io/pudlgig -o ".gitignore" && curl -L https://git.io/pudlcg -o "config.js"
Next, change the project variables in the config.js
file according to your folder structure.
// List of Project Variables.
module.exports = {
viewSrc: './views/**/*.pug',
viewDst: './',
styleSrc: './css/style.scss',
styleDst: './',
outputStyle: 'compressed',
viewWatchFiles: './views/**/*.pug',
styleWatchFiles: './css/**/*.scss',
browserAutoOpen: false,
injectChanges: true
};
In the root folder of your development project install the Node Dependencies. In the terminal run the following command and wait for it to download all the node.js
dependencies. It's a one-time process and can take about 5 minutes or more depending on the speed of your internet connection.
# For MAC OS X run the following command with super user.
npm install
# For Linux run the following command.
npm install
Finally, run the following command to get up and running with pudl.
# To start pudl
npm start
# To stop pudl press CTRL (β) + C
Now gulp
will start watching your pug
and sass
files for any changes and provides you with a link through which you can access your site locally. The localhost link can be accessed by http://localhost:3000/
.
Released under GNU GPLv2.0 or later license. Copyright Maedah Batool
π Hello, we're the Dev Couple!
Ahmad Awais (my husband) is an OSS developer advocate, Full Stack Web Developer and a regular core contributor at WordPress. I (Maedah Batool) is a Technical Content Program Manager, and I'm also a WordPress Core Contributor. Together with our team, we run the TheDevCouple.com.
If you'd like to get insights into our love for open source software, professional full stack development, WordPress community, the growth of JavaScript or growing a family, building, and bootstrapping a business, then subscribe to our newsletter called β£ The Developers Takeaway!
If you'd like us to keep producing professional free and open source software (FOSS). Consider paying for an hour of my dev-time. We'll spend two hours on open source for each contribution. Yeah, that's right, you pay for one hour and get both of us to spend an hour as a thank you.
- π $99.99 β Support for one hour or more β
- π° $49.99 β Support half an hour maintenance β
- βοΈ $9.99 β Buy us lunch or coffee to keep us trucking #OpenSource β
This open source project is maintained and supported by the help of awesome companies listed below. Read more about it here β
Follow me π on Twitter for more updates and questions β