puppeteer-functions
puppeteer-functions copied to clipboard
How to use?
How can i test this repo?
I think you should clone it and use some of these, but they should run automatically when you do npm install
"postinstall": "yarn install-functions",
"install-functions": "cd functions && yarn",
"cleanup": "rimraf functions-dist",
"buildnode6": "babel 'functions' --out-dir 'functions-dist' --presets=es2017 --copy-files --ignore 'node_modules'",
"postbuildnode6": "rimraf ./functions-dist/node_modules && cp -R ./functions/node_modules ./functions-dist",
"build": "cp functions/index.js ./functions-dist",
"start": "firebase serve --only hosting,functions",
"deploy": "yarn lint && yarn build && firebase deploy",
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .)"
},
I am no expert though
How can i test this repo?
- You can clone this repo by using git: git clone https://github.com/ebidel/puppeteer-functions.git (or just saving .zip file)
- Then check if you have firebase-tools installed globally.
- Look in folders /puppeteer-functions/ and /puppeteer-functions/functions there should be files package.json. It means that this package has a list of dependencies and you have to install it running : npm install in both of folders, or just npm run install-functions.
- Now (as I see in package.json) use npm run build (But I'm not sure if it's really necessary)
- At this moment you your application is ready. But you need to create a project on firebase using web interface console.firebase.google.com/ , then check .firebaserc and put your project name. 6)You have to run commands npm run start or npm run deploy (in project root folder) to start a project locally / on google cloud servers