The current setup has been tested on Next Js 7.0.0
.
You need to install Axios.
$ npm install axios
# Remove the file from the repository | |
git rm --cached .idea/ | |
# now update your gitignore file to ignore this folder | |
echo '.idea' >> .gitignore | |
# add the .gitignore file | |
git add .gitignore | |
git commit -m "Removed .idea files" |
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
webpack.mix.js
file in root directory:const { mix } = require('laravel-mix');
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
/* Optional: uncomment for bootstrap fonts */
// mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap/','public/fonts/bootstrap');
Description: | |
Given the triangle of consecutive odd numbers: | |
1 | |
3 5 | |
7 9 11 | |
13 15 17 19 | |
21 23 25 27 29 | |
... |
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
/* | |
MIT LICENSE | |
Copyright 2011 Jon Leighton | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |