puppeteer-functions icon indicating copy to clipboard operation
puppeteer-functions copied to clipboard

How to use?

Open iamchriswick opened this issue 6 years ago • 2 comments

How can i test this repo?

iamchriswick avatar Nov 15 '18 23:11 iamchriswick

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

girotomas avatar Aug 14 '19 05:08 girotomas

How can i test this repo?

  1. You can clone this repo by using git: git clone https://github.com/ebidel/puppeteer-functions.git (or just saving .zip file)
  2. Then check if you have firebase-tools installed globally.
  3. 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.
  4. Now (as I see in package.json) use npm run build (But I'm not sure if it's really necessary)
  5. 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

balalamba avatar Aug 14 '19 09:08 balalamba